Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show base errors on active_admin gem

In the admin area, how do i go about and show the base errors (errors not specific to a field?). Ideally i would like to do this for all models.

Thanks

like image 573
montrealmike Avatar asked Sep 10 '12 19:09

montrealmike


1 Answers

I just found an easy way to get them.. but you still have to override the form:

ActiveAdmin.register Blah do

  form do |f|
    f.semantic_errors :blah
    f.inputs do
      f.input :one
      f.input :two
    end
    f.buttons
  end  

end

Update You can simplify it like this too:

  form do |f|
    f.semantic_errors :blah
    f.inputs
    f.buttons
  end  

end
like image 176
Jake Dempsey Avatar answered Oct 22 '22 05:10

Jake Dempsey