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

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

Categories

HOME
python-2.7
nam
antd
activemq
filesize
consul
turbojpeg
visualforce
save
u-boot
timber
nsstring
csrf
cuba-platform
trace32
squid
pfobject
social-tables
gitkraken
yii2-basic-app
workday
coreldraw
batch-rename
eclipse-emf
exchange-server-2010
hdmi
clipboard
echosign
gravity-forms-plugin
xenapp
location-services
netbios
riotjs
knights-tour
ms-media-foundation
django-crispy-forms
stat
netapp
jacoco-maven-plugin
uipickerview
angular-datatables
1wire
notesview
code-push
kitura
ipp-protocol
ssi
mura
freshdesk
htmlspecialchars
business-rules
ltrace
dymola
http4s
wildfly-9
xmlbeans
django-testing
gcloud-node
mathml
accessibilityservice
okta-api
wif4.5
enunciate
servicestack-bsd
arbre
knife
hmisc
wso2ml
uitest
swagger-maven-plugin
algebraixlib
org-babel
artisan
quercus
fuseesb
rfc5545
mutators
maven-shade-plugin
fat32
string.format
ildasm
smacss
screwturn
fileshare
refit
nodeload
profiles
colon
mute
non-ascii-characters
tnt4j
jacob
jbox2d
user-forums
getproperty
server-name
trialware
boost-foreach
turbine
cassini
multiple-users
ccnet-config
resharper-5.1
pinax
reliability
3270
ntruencrypt
autobench
iphone-sdk-3.1.3
service-factory

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App