In the setup of
class Group < ActiveRecord::Base
   has_many users :through =>user_groups
end

class User ..
...
end

for "admin" like behavior (i.e. we want to see any/all users associated
with this group), this is enough.
However, in other cases, I want something like


class Group < ActiveRecord::Base
   has_many users :through =>user_groups, :conditions =>
"user_groups.user_status_for_this_group = 'OK'"
end

what is the best way to do both simultaneously (without resorting to
something like:
user_groups.scoped_by_user_status_for_this_group('OK').collect { |ug|
ug.user} etc...

-Cole
-- 
Posted via http://www.ruby-forum.com/.

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