Sha256: 7cf0aa5ed5e0e333759225217b2983dce8be916fbf3347db6edea015a6e6065a

Contents?: true

Size: 741 Bytes

Versions: 22

Compression:

Stored size: 741 Bytes

Contents

class MyAdmin::Group < ActiveRecord::Base
  self.table_name = "my_admin_groups"
  
  has_many :user_groups, :dependent => :destroy
  has_many :users, :through => :user_groups
  
  has_many :group_permissions, :dependent => :destroy
  has_many :permissions, :through => :group_permissions
  
  validates_uniqueness_of :name
  validates_presence_of :name
  
  
  config_my_admin do |admin|
    admin.application = "authentication"
    admin.list_display = [:name, :description]
    admin.fieldsets = [{:fields => [:name, :description]},
                       {:name => :permissions,
                        :fields => [:permissions]}]
    admin.fields = {:description => {:type => :clear_text}}
  end
  
  def to_s
    self.name
  end
  
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
my_admin-0.1.13 app/model/my_admin/group.rb
my_admin-0.1.12 app/model/my_admin/group.rb
my_admin-0.1.11 app/model/my_admin/group.rb
my_admin-0.1.10 app/model/my_admin/group.rb
my_admin-0.1.9 app/model/my_admin/group.rb
my_admin-0.1.8 app/model/my_admin/group.rb
my_admin-0.1.7 app/model/my_admin/group.rb
my_admin-0.1.6 app/model/my_admin/group.rb
my_admin-0.1.5 app/model/my_admin/group.rb
my_admin-0.1.4 app/model/my_admin/group.rb
my_admin-0.1.3 app/model/my_admin/group.rb
my_admin-0.1.2 app/model/my_admin/group.rb
my_admin-0.1.1 app/model/my_admin/group.rb
my_admin-0.0.12 app/model/my_admin/group.rb
my_admin-0.0.11 app/model/my_admin/group.rb
my_admin-0.0.10 app/model/my_admin/group.rb
my_admin-0.0.9 app/model/my_admin/group.rb
my_admin-0.0.8 app/model/my_admin/group.rb
my_admin-0.0.7 app/model/my_admin/group.rb
my_admin-0.0.6 app/model/my_admin/group.rb