activeadmin


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.

Related Links

How to filter by “is not” in active admin/ransack
Active Admin image upload with refile
AuthorizationAdapter in ActiveAdmin
ActiveAdmin and Rails Engine. How do you keep the path name the same?
Active admin defining scope for custom page
ActiveAdmin: Can I redirect the user to the index after they create/edit something?
Active admin and Pundit
Sortable for has_many does not sort properly
select2 remove tag_list item
Adding Numeric Range Filtering to ActiveAdmin
undefined method `destroy_user_session_path' for active admin with cancancan and sorcery
Active admin not working in production mode
ActiveAdmin cannot authorize in rails-api project
How can I create an ActiveAdmin filter that will show only objects without a value specified?
jQuery, activeadmin: custom filter with ransack. how to alter displayed text in search box
ActiveAdmin lable name cant be singular

Categories

HOME
orientdb
gaming
yaml
windows-10
haproxy
stacktrace.js
semantic-web
mongoid
google-sheets-query
linker
capistrano
ui-automation
save
u-boot
port
twisted
batch-rename
quantitative-finance
ini
django-import-export
substance
monitor
vcenter
microsoft-certifications
polyml
assertions
nsuserdefaults
forms-authentication
ms-dos
mv
text-decorations
python-jira
virtual-memory
xcode8.2
line-intersection
email-forwarding
.when
dcount
dmarc
eclemma
adp
rails-engines
adjacency-list
swiffy
gwt-syncproxy
vimperator
voronoi
outlook.com
knife
supersocket.net
karma-coverage
python-curses
n-tier-architecture
inputbox
multivariate-testing
storing-data
windows-messages
.htpasswd
zend-search-lucene
gpu-programming
map
windows-taskbar
lsa
revmob
postgres-xc
microformats
jbox2d
oembed
contextswitchdeadlock
office-app
ip-geolocation
struts2-json-plugin
clrprofiler
arrow
chronometer
server-name
exponent
uipasteboard
sql-parametrized-query
rtd
fragment-identifier
ognl
oracle-pro-c
browser-based
processors
main-method
subtext
stretchblt
datagridcolumn
activex-exe
remote-working

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App