Have myself confused . . .
I have a SubscriptionPlan ActiveRecord object which has an HABTM to available_to_roles.
In Rails 3 I'm trying to create a scope or class method on SubscriptionPlan to get appropriate subscription plans:
def self.available_subscription_plans(users_roles) #users_roles = Array of roles
#query to find all subscription plans where available_to_roles is in users_roles
end
Having a very hard time figuring out the most appropriate way to do this with the new syntax.
Thanks for any pointers in the right direction!