app/models/user.rb in wheels-0.0.25 vs app/models/user.rb in wheels-0.0.26

- old
+ new

@@ -2,11 +2,16 @@ after_create :create_profile belongs_to :role has_many :blogs, :dependent => :destroy has_one :profile, :dependent => :destroy has_many :galleries, :dependent => :destroy + has_many :access_control_entries, :dependent=>:destroy + def self.nobody + User.new(:role=>"Nobody") + end + def create_profile Profile.create(:user=>self) unless self.profile end def role?(role) @@ -34,14 +39,9 @@ def confirm! self.confirmed_at = DateTime::now save end + devise :database_authenticatable, :recoverable, :rememberable, :trackable, :validatable, :token_authenticatable, :lockable, :timeoutable - # Include default devise modules. Others available are: - # :token_authenticatable, :confirmable, :lockable and :timeoutable - devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable, :token_authenticatable, :confirmable, :lockable, :timeoutable - - # Setup accessible (or protected) attributes for your model - attr_accessible :email, :password, :password_confirmation end