Created
October 26, 2011 08:23
-
-
Save ysr23/1315773 to your computer and use it in GitHub Desktop.
This file contains 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
If i set default scope as below it works as seen in the count | |
------------ | |
default_scope where('start > ?', Time.now+1.hour) | |
irb(main):016:0> guide = Guide.bbc1.count | |
=> 481 | |
-------------------- | |
yet if i set it as below it doesn't? | |
def self.default_scope | |
where('start > ?', Time.now+1.hour) | |
end | |
irb(main):001:0> guide = Guide.bbc1.count | |
=> 1451 | |
------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment