please add with_role scope #14

vkill opened this Issue Sep 7, 2011 · 3 comments

4 participants


The with_role scope is added, but it isn't working out of the box for me. I copied the scope into my user model and replaced column name with my column name.


this works for me:

scope :with_role, proc { |r|
query = "#{self.table_name}.roles LIKE " + ['\'%',r,'%\''].join



I couldn't see anywhere in the source code where the with_role scope was added, even though the documentation suggests that with_role does work. Please add this in!

@vkill vkill closed this Sep 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment