question @ ransack

5 views
Skip to first unread message

tom

unread,
Mar 2, 2015, 9:40:24 AM3/2/15
to Ruby on Rails: Talk
hi,

switching from metasearch to ransack and not sure how to do this:

@q = Person.ransack(params[:q])
#filter more 
@q = @q.id_eq("test") if current_user  #<< how do i make this work?

@people = @q.result(distinct: true)
Reply all
Reply to author
Forward
0 new messages