4

Is there an easy way to override the title on an ActiveScaffold page? I know I can customize the name of the model part, but what if I want to say "Let's make a new widget, shall we?" instead of "Create Widget"? It seems overkill to override the whole template or partial just to get a new heading.

The ActiveScaffold default _create_form_html.erb is

  <% form_action ||= :create %>
  <%= render :partial => "base_form", :locals => {:xhr => xhr ||= nil,
      :form_action => form_action,
      :method => method ||= :post,
      :cancel_link => cancel_link ||= true,
              :headline => headline ||= active_scaffold_config.... } %>

Is there a way to set that headline variable from inside the controller?

Mike Blyth
  • 4,158
  • 4
  • 30
  • 41

1 Answers1

4

Inside the scaffold config write:

conf.list.label = 'The list label'
conf.create.label = 'Let's make a new widget, shall we?'
clyfe
  • 23,695
  • 8
  • 85
  • 109