On Rails 4. I'm getting some strange errors when I try to load index pages in Active Admin. They were all working fine before, but suddenly I started getting this message (for this example I loaded my Categories index but it is happening for most of them):
NoMethodError in Admin::Categories#index
Showing c:/Ruby200/lib/ruby/gems/2.0.0/bundler/gems/active_admin-3fb7f03335b1/app/views/active_admin/resource/index.html.arb where line #1 raised:
undefined method `validators_on' for Ransack::Search:Class
Extracted source (around line #1):
insert_tag renderer_for(:index)
Application Trace | Framework Trace | Full Trace
config/initializers/form_builder.rb:12:in `label'
I did a search for that method name and it returned only this:
In form_builder.rb
if object.class.validators_on(method).map(&:class).include? ActiveRecord::Validations::PresenceValidator
if options.class != Hash
options = {:class => "required"}
else
options[:class] = ((options[:class] || "") + " required").split(" ").uniq.join(" ")
end
end
I can view the dashboard and individual row pages fine, but when I go to edit a record I get this:
TypeError in Admin::Categories#edit
Showing c:/Ruby200/lib/ruby/gems/2.0.0/bundler/gems/active_admin-3fb7f03335b1/app/views/active_admin/resource/edit.html.arb where line #1 raised:
no implicit conversion of String into Array
Extracted source (around line #1):
insert_tag renderer_for(:edit)
Application Trace | Framework Trace | Full Trace
config/initializers/form_builder.rb:16:in `label'
I have no idea what this means...would it be better to re-install Active Admin/regenerate its assets? Is that a safe thing to do? If so, how do I do that? Or, is there a simple fix to these error messages. Thanks for any help.