Guest User

Untitled

a guest
May 24th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. >> Category.scopes.keys
  2. => [:hidden, :visible, :ordered]
  3.  
  4. >> Category.hidden.to_sql
  5. => "SELECT `categories`.* FROM `categories` WHERE (`categories`.`visible` = 0)"
  6.  
  7. >> Category.hidden.first
  8. => #<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>
  9.  
  10. >> Category.new.visible
  11. => true
  12.  
  13. >> Category.hidden.new.visible
  14. => false
Add Comment
Please, Sign In to add comment