Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- query = Model.find_something
- query = query.where(condition1: true) if condition1 == true
- query = query.where(condition2: true) if condition2 == true
- query = query.where(condition3: true) if condition3 == true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement