summaryrefslogtreecommitdiff
path: root/app/models/group.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/group.rb')
-rw-r--r--app/models/group.rb3
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