Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >> Category.scopes.keys
- => [:hidden, :visible, :ordered]
- >> Category.hidden.to_sql
- => "SELECT `categories`.* FROM `categories` WHERE (`categories`.`visible` = 0)"
- >> Category.hidden.first
- => #<Category id: 14, name: "Zum Verkauf*", position: 9001, description: nil, visible: false, created_at: "2009-10-20 11:46:36", updated_at: "2009-10-20 14:33:22", deletable: false>
- >> Category.new.visible
- => true
- >> Category.hidden.new.visible
- => false
Add Comment
Please, Sign In to add comment