On Wed, Oct 22, 2008 at 1:43 PM, Sven <[EMAIL PROTECTED]> wrote: > ... > This lets me use the named scope instead of a method but the semantics > aren't right. I'm trying to express the notion that active > category.posts are subject to an additional restriction relative to > active posts. I'm not trying to divide _posts_ into two groups. I'm > just trying to restrict _active_ posts within a category.
Restricting is dividing your set into those items you want and those you don't. Since you have attributes across two models, Post#active and CategoryAssignment#show_in_category, though, I don't think you can combine them into one named_scope. I think you'll have to do something like you suggested at the end of your last message, or you'll have to wrap everything in a class method to have the semantics that you want. 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 -~----------~----~----~----~------~----~------~--~---

