Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ActiveAdmin.register Restaurant do
- scope("All"){|scope| scope.order("created_at desc")}
- Cuisine.all.each do |c|
- scope(c.name) { |scope| scope.joins(:cuisines).where("cuisines.id=?",c.id)}
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement