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.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/models/group.rb b/app/models/group.rb
new file mode 100644
index 0000000..e0cfaab
--- /dev/null
+++ b/app/models/group.rb
@@ -0,0 +1,11 @@
+class Group < ActiveRecord::Base
+ attr_accessible :name, :active, :comment
+
+ has_many :group_memberships, :dependent => :destroy
+ has_many :group_permissions, :dependent => :destroy
+ has_many :permittances, :foreign_key => :target_group_id, :class_name => "GroupPermission", :dependent => :destroy
+
+ def to_s
+ self.name
+ end
+end