On Feb 10, 7:27 pm, Erol Fornoles <[email protected]> wrote:
>
> Named scopes are already sufficient for what you're trying to achieve:
>
> class Sprocket
>   named_scope :versioned, lambda { |version| {:conditions => {:version => 
> version}} }
> end
>
> widget.sprockets.version(version).all(:conditions => callers_conditions)

Cool, I didn't know that the evaluated result (Array-like-thingy) of
an association could in turn be used to access named scopes w/in the
associated class. Works great.

Thanks.

-- 
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