Created
July 7, 2010 13:57
-
-
Save karmajunkie/466726 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is another file for demo purposes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Group < ActiveRecord::Base | |
named_scope :managers, :conditions => {:name => "Managers"} | |
#... similar for other groups you need access to | |
end | |
case user.group.name | |
when /Managers/ | |
results = Group.managers | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment