Groups
Groups
Sign in
Groups
Groups
rails_admin
Conversations
About
Send feedback
Help
List view question: has_many through relationship searchable
184 views
Skip to first unread message
Walksalong
unread,
Mar 8, 2012, 4:48:25 PM
3/8/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rails...@googlegroups.com
Hello,
has_many :person_programs
has_many :programs, :through => :person_programs
I'd like to search for programs on the people list page.
https://github.com/sferik/rails_admin/wiki/List
describes belongs_to searches, but I couldn't find anything for has_many.
config.model Person do
list do
field :programs do
#tried this
searchable [{:programs => :name}, {:programs => :id}]
end
end
Thanks!
Benoit Bénézech
unread,
Mar 9, 2012, 5:50:59 AM
3/9/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rails...@googlegroups.com
has_many are not added to the include for perf reason. That means that AR won't find the :programs table.
Mark Silverberg
unread,
Oct 21, 2013, 10:24:20 AM
10/21/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rails...@googlegroups.com
any suggestions on how to patch so that has_many are included?
Reply all
Reply to author
Forward
0 new messages