Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- named_scope :price, lambda {
- |start, finish| {
- if start == "0"
- :conditions => ['cost = ?', 0]
- elsif finish == "101"
- :conditions => ['cost => ?', 101]
- else
- :conditions => ['cost IN (?)', start..finish]
- end
- }
- }
Add Comment
Please, Sign In to add comment