undefined method `query_parameters' in Active Admin show/panel/table_for
I have something very similar working in another model, so there must be something minor that I'm overlooking. I have a model Request that has_many RequestState(s), which in return has_one. ActiveAdmin.register Request do show do |ad| ... panel "Request States" do table_for ad.request_states do column :id column :actor_id column :state column :created_at end end end end When I try to load the page, I get: NoMethodError in Admin::Requests#show undefined method `query_parameters' for #<Request:0x000001062040c0> and it's complaining about each of the "column" lines. The underlying data seems fine since the following and similar work correctly from the rails console: Request.find(37).request_states.pluck(:id)
Request is a reserved Class by Rails. I think you have to use something else class name. http://api.rubyonrails.org/classes/ActionDispatch/Request.html But not sure, because it's namespaced...
I was getting this issue and, for me at least, it turned out to be the assignment of #request in a before_filter called in my ApplicationController: def newsletter #request = NewsletterRequest.new end Changed the #request to #newsletter_request and avoided the collision.
Active admin install with Rails 4
ActiveAdmin won't save has many and belongs to many field
Truncate data in ActiveAdmin index page
Active Admin: how to set filter label dynamically
How to add an HTML-class to an ActiveAdmin index table
How to use modules to split very long code in active admin?
Downloading all records of a paginated resource in ActiveAdmin
Can you use the Form() command in ActiveAdmin in the content of a custom page?
CollectionAction route being skipped, action treated as ID
Possible to “split” an ActiveAdmin resource between multiple menu items?
Rails: activeadmin, undefined method `per' for #<ActiveRecord::Relation:0x4d15ee0>
Active Admin create form in register_page
ActiveAdmin - how to customize edit action?
ActiveAdmin - Filter with default value
Make semantic_errors render the exact error-message
ActiveAdmin - Custom action with reusing the show form