Configuration
Everything is set in
config/initializers/rails_markup.rbviaRailsMarkup.configure.
Full reference
| Option | Default | What it does |
|---|---|---|
base_controller_class |
"RailsMarkup::ApplicationController" |
Parent for the dashboard + toolbar API. Set to a controller that enforces auth. |
api_token |
nil |
Bearer token for the external /external/* API (MCP production tools). nil disables it. |
table_name |
"rails_markup_annotations" |
Annotations table name. |
per_page |
25 |
Dashboard page size. |
toolbar_enabled |
true |
Master switch for the whole toolbar system. |
fab_visible |
true |
Show the floating button. false hides it while pins + panel stay active. |
toolbar_position |
"bl" |
FAB corner: bl / br / tl / tr. |
toolbar_size |
"default" |
slim (32px) / compact (40px) / default (48px). |
toolbar_accent |
"indigo" |
indigo / amber / blue / emerald / rose. |
enable_screenshots |
true |
Element screenshot capture + drawing tools. |
return_url |
nil |
"Back to app" link in the dashboard header. |
dashboard_layout |
"rails_markup/application" |
Set to a host layout to embed the dashboard. |
author_name_method |
:email |
Symbol or Proc resolving the author name from current_user. |
on_create_callback |
nil |
Proc called after an annotation is created (Slack/email/webhook). |
health_interval |
60 |
Toolbar health-check poll interval (seconds, min 10). |
Example
RailsMarkup.configure do |config|
config.base_controller_class = "Admin::BaseController"
config.toolbar_position = "br"
config.toolbar_size = "compact"
config.fab_visible = true
config.author_name_method = ->(u) { "#{u.first_name} #{u.last_name}" }
config.on_create_callback = ->(a) { SlackNotifier.notify(a.content) }
end
FAB visibility vs. toolbar
-
toolbar_enabled = false— nothing is injected (no FAB, no pins, no sync). -
fab_visible = false— the button is hidden, but pins render and the panel is still reachable. Use when the host provides its own trigger or wants read-only pins.
source: nauman/rails-markup · rev 1.2.1