diff options
| author | simon <simon@zagal.(none)> | 2009-02-12 00:06:36 +0100 |
|---|---|---|
| committer | hukl <hukl@eight.local> | 2009-02-15 20:22:19 +0100 |
| commit | 0a04dcd23b4e9ef71586e131a646decee2a67061 (patch) | |
| tree | c5d58fcc9770ac05abec73544e30e3ad2a27a7c7 /app/models/user.rb | |
| parent | f10e79a554bd0666de6390c4bc34b52c8ecd936d (diff) | |
* added missing associations
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 |
