diff options
author | Peter Kozak <spag@golwen.net> | 2013-02-28 09:09:10 -0500 |
---|---|---|
committer | Peter Kozak <spag@golwen.net> | 2013-02-28 09:09:10 -0500 |
commit | 6238abea422a1be14d5f3d8cbacd78f2e72fd466 (patch) | |
tree | 1a7d4b80ed84e50a744e7dd18c5bbf60c7dfc38d /app/models | |
parent | 1353b9c0563da02f1b17e54d802f28221cdce982 (diff) |
group defaults
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/group.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/group.rb b/app/models/group.rb index e0cfaab..c459530 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -5,6 +5,9 @@ class Group < ActiveRecord::Base has_many :group_permissions, :dependent => :destroy has_many :permittances, :foreign_key => :target_group_id, :class_name => "GroupPermission", :dependent => :destroy + validates :name, + :presence => true + def to_s self.name end |