Sha256: 768f10e58db467636014c64691c63f200f68327ca854eca4d050ec85e0abdbd9

Contents?: true

Size: 423 Bytes

Versions: 42

Compression:

Stored size: 423 Bytes

Contents

# UserGroup - User intersection model
#
module Edgarj
  class UserGroupUser < ActiveRecord::Base
    self.table_name = 'edgarj_user_group_users'

    belongs_to  :user_group
    belongs_to  :user

    validates_presence_of   :user_group_id
    validates_presence_of   :user_id
    validates_uniqueness_of :user_id, :scope=>:user_group_id

    def name
      self.user.name + ' of ' + self.user_group.name
    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
edgarj-4.06.10 app/models/edgarj/user_group_user.rb
edgarj-4.06.09 app/models/edgarj/user_group_user.rb
edgarj-4.06.07 app/models/edgarj/user_group_user.rb
edgarj-4.06.05 app/models/edgarj/user_group_user.rb
edgarj-4.06.04 app/models/edgarj/user_group_user.rb
edgarj-4.06.03 app/models/edgarj/user_group_user.rb
edgarj-4.06.02 app/models/edgarj/user_group_user.rb
edgarj-4.06.01 app/models/edgarj/user_group_user.rb
edgarj-4.06.00 app/models/edgarj/user_group_user.rb
edgarj-4.05.04 app/models/edgarj/user_group_user.rb
edgarj-4.05.03 app/models/edgarj/user_group_user.rb
edgarj-4.05.02 app/models/edgarj/user_group_user.rb
edgarj-4.05.01 app/models/edgarj/user_group_user.rb
edgarj-4.05.00 app/models/edgarj/user_group_user.rb
edgarj-4.04.01 app/models/edgarj/user_group_user.rb
edgarj-4.04.00 app/models/edgarj/user_group_user.rb
edgarj-4.03.00 app/models/edgarj/user_group_user.rb
edgarj-4.02.00 app/models/edgarj/user_group_user.rb
edgarj-4.01.01 app/models/edgarj/user_group_user.rb
edgarj-4.01.00 app/models/edgarj/user_group_user.rb