On Wed, Oct 22, 2008 at 11:51 AM, Sven <[EMAIL PROTECTED]> wrote:

> ...
>
> Is there a better way to accomplish this using named_scopes?


My first thought is to define the named_scope as you have and also define a
wrapper method. In the wrapper method, you can make the time parameter
optional with a default of Time.now. Then you'd just use the wrapper method
instead of the named_scope directly. I don't know how well that would play
with chaining of named_scopes.

Regards,
Craig

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to