app/models/user.rb in wheels-0.0.31 vs app/models/user.rb in wheels-0.0.32
- old
+ new
@@ -5,10 +5,14 @@
has_one :profile, :dependent => :destroy
has_many :galleries, :dependent => :destroy
has_many :access_control_entries, :dependent=>:destroy
def self.nobody
- User.new(:role=>"Nobody")
+ User.new(:role=>Role.nobody)
+ end
+
+ def self.root
+ User.where(:role_id=>Role.root.id)
end
def create_profile
Profile.create(:user=>self) unless self.profile
end