Joined June 2014
·

Martin Chabot

Montreal
·
·

Posted to Scopes with Ransack over 1 year ago

Thanks for the quick response, I didn't know about that Rails 4 change.

Thanks again for your gem it helped me a lot for migrating from a Rails 2 with searchlogic to a Rails 3 with Ransack.

Posted to Scopes with Ransack over 1 year ago

It seems to be a pretty nice solution for adding scopes to Ransack. I think its an elegant solution to that problem.

However I am wondering why you pass Order.all to the siphon method at this line:

@orders = siphon(Order.all).scope(@order_form)

When you call Order.all is it going execute the query ? How can you apply the scope on the array?

Should it be instead, something like this ?:
@orders = siphon(Order.scoped).scope(@order_form)

Achievements
58 Karma
0 Total ProTip Views