I'm a little confused by your example. Do you mean posts instead of
channels? :show_in_category is on Post, correct?
Assuming posts and :show_in_category on Post, couldn't you just add a second
named_scope to Post, show_in_category (for lack of a better name)?
class Post < ActiveRecord::Base
named_scope :active, :conditions => { :active => true }
named_scope :show_in_category, :conditions => { :show_in_category => true
}
...
end
Then you could do some_category.posts.active or
some_category.posts.active.show_in_category as you see fit.
Thoughts?
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
-~----------~----~----~----~------~----~------~--~---