diff options
Diffstat (limited to 'app/models/user.rb')
| -rw-r--r-- | app/models/user.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index 3ac0712..2bb4879 100644 --- a/app/models/user.rb +++ b/app/models/user.rb | |||
| @@ -1,9 +1,14 @@ | |||
| 1 | require 'digest/sha1' | 1 | require 'digest/sha1' |
| 2 | 2 | ||
| 3 | class User < ActiveRecord::Base | 3 | class User < ActiveRecord::Base |
| 4 | # Mixins and Plugins | ||
| 4 | include Authentication | 5 | include Authentication |
| 5 | include Authentication::ByPassword | 6 | include Authentication::ByPassword |
| 6 | 7 | ||
| 8 | # Associations | ||
| 9 | has_many :permissions | ||
| 10 | |||
| 11 | # Validations | ||
| 7 | validates_presence_of :login | 12 | validates_presence_of :login |
| 8 | validates_length_of :login, :within => 3..40 | 13 | validates_length_of :login, :within => 3..40 |
| 9 | validates_uniqueness_of :login | 14 | validates_uniqueness_of :login |
