You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a controller that performs a search. To do that I have a lot of scopes chained together to obtain the right result. Because the user doesn't need to fill all scopes, when a scope is not used, the scope must be transparent.
Usually, I do for example scope :in_range, ->(min, max) { where(id: (min..max)) if min.present? && max.present? }
used like that:
I have a controller that performs a search. To do that I have a lot of scopes chained together to obtain the right result. Because the user doesn't need to fill all scopes, when a scope is not used, the scope must be transparent.
Usually, I do for example
scope :in_range, ->(min, max) { where(id: (min..max)) if min.present? && max.present? }
used like that:
what do you think if I modify
state_machines-activerecord/lib/state_machines/integrations/active_record.rb
Lines 567 to 569 in daec4b5
So I will change the behaviour from:
to:
The text was updated successfully, but these errors were encountered: