lib/active_admin/views/pages/form.rb in activeadmin-0.4.4 vs lib/active_admin/views/pages/form.rb in activeadmin-0.5.0.pre
- old
+ new
@@ -4,11 +4,11 @@
class Form < Base
def title
I18n.t("active_admin.#{params[:action]}_model",
- :model => active_admin_config.resource_name)
+ :model => active_admin_config.resource_label)
end
def form_presenter
active_admin_config.get_page_presenter(:form) || default_form_config
end
@@ -28,21 +28,21 @@
private
def default_form_options
{
:url => default_form_path,
- :as => active_admin_config.underscored_resource_name
+ :as => active_admin_config.resource_name.singular
}
end
def default_form_path
resource.persisted? ? resource_path(resource) : collection_path
end
def default_form_config
ActiveAdmin::PagePresenter.new do |f|
f.inputs
- f.buttons
+ f.actions
end
end
end
end