Skip to content

Instantly share code, notes, and snippets.

@karmajunkie
Created July 7, 2010 13:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karmajunkie/466726 to your computer and use it in GitHub Desktop.
Save karmajunkie/466726 to your computer and use it in GitHub Desktop.
This is another file for demo purposes
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