Created
June 30, 2011 03:35
-
-
Save dangalipo/1055579 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def self.premium_hotels | |
| where(:premium => true) | |
| end | |
| #is the same as | |
| scope :premium_hotels, where(:premium => true) | |
| #similarly | |
| def self.rating_descending | |
| order("rating DESC") | |
| end | |
| # is the same as | |
| scope :rating_descending, order("rating DESC") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment