gregbell/active_admin — pull request #2196 by renuyardaycompass (2013-05-14 11:49:25+00:00)
Title: adding title for forms

Usage :
Example 1:
ActiveAdmin.register Category do
form do |f|
f.inputs do
f.input :name
f.input :description
end
f.actions
end
end

Edit and New Forms shows Default Titles (Edit Category and New Category)

Example 2:

ActiveAdmin.register Category do
form :title => "A new title" do |f|
f.inputs do
f.input :name
f.input :description
end
f.actions do
f.action :submit
f.action :cancel, :label => 'Cancel', :input_html => {:class => 'cancel_subscription'}
end
end
end

Edit and New Forms shows the new Title ("A new title")

Example 3:

ActiveAdmin.register Category do
form :title => { :new => "New Category", :edit => "Renew Category"} do |f|
f.inputs do
f.input :name
f.input :description
end
f.actions do
f.action :submit
f.action :cancel, :label => 'Cancel', :input_html => {:class => 'cancel_subscription'}
end
end
end

Edit and New Forms shows the new titles ("Renew Category" and "New Category" respectively)