administrate: Issue: undefined method `per'
I am hitting this error no matter how many models I remove form my DashboardManifest when visiting localhost:3000/admin.
Currently running rails 4.2.4
The gem installed with no issues and the install ran perfectly with no issues. I chose to not configure anything until I could get the base up and running, however it looks like that is not possible. I checked to make sure all dependencies were also installed properly. Any ideas as to what could be causing this error?
method_missing - activerecord (4.2.4) lib/active_record/relation/delegation.rb
elsif array_delegable?(method)
to_a.public_send(method, *args, &block)
elsif arel.respond_to?(method)
arel.public_send(method, *args, &block)
else
super
end
end
end
end
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 21 (7 by maintainers)
For the latest version (0.9.0), I had to change the following line (second line in the method) as suggested above from:
resources = Administrate::Search.new(resource_resolver, search_term).run
to:resources = Administrate::Search.new(scoped_resource, dashboard_class, search_term).run
Anyone who runs into this issue at point, @gentle-noah’s solution still works, but you need to add an extra line with the
render locals
block, like so:show_search_bar: show_search_bar?
Which would make it look like:
If you are using will_paginate, add this to one of the initializers and problem should be solved
Updated the index method in
app/controllers/admin/application_controller.rb
to:And strangely enough, the kaminari pagination links work great… SO, issue solved. Thank you for trouble shooting with me @graysonwright
ah, will_paginate…
Going to try the following:
Will report back soon.