Skip to content

Instantly share code, notes, and snippets.

@ysr23
Created October 26, 2011 08:23
Show Gist options
  • Save ysr23/1315773 to your computer and use it in GitHub Desktop.
Save ysr23/1315773 to your computer and use it in GitHub Desktop.
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