I am using wice_grid and have defined a custom filter for two associated models, following the instruction of the gem. I have:
g.column name: 'Organization', filter_type: :string, attribute: 'name', model: 'Organization', auto_reload: true, html: {id: 'grid-cells'},
custom_filter: Organization.find(:all).map{|pr| [pr.name, pr.name]} do |user|
link_to(user.organization.name, organization_path(user.organization))
end
This generates the error:
Couldn't find Organization with 'id'=all
Any idea what I'm doing wrong?
Use Organization.all
. find(:all)
is deprecated in latest version of rails
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.