How to override form title or title in ActiveScaffold

Is there an easy way to override the title on an ActiveScaffold page? I know that I can customize the name of the model part, but what if I want to say, "Let's create a new widget, right?" instead of "Create Widget"? It seems unnecessary to override the entire template or partial to get a new title.

ActiveScaffold default value _create_form_html.erb

<% 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 this headline variable from inside the controller?

+4
source share
1 answer

Inside the config config file:

 conf.list.label = 'The list label' conf.create.label = 'Let make a new widget, shall we?' 
+4
source

Source: https://habr.com/ru/post/1334073/


All Articles