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.00.04 app/models/edgarj/user_group_user.rb
edgarj-4.00.03 app/models/edgarj/user_group_user.rb
edgarj-4.00.02 app/models/edgarj/user_group_user.rb
edgarj-4.00.01 app/models/edgarj/user_group_user.rb
edgarj-0.02.00 app/models/edgarj/user_group_user.rb
edgarj-0.01.30 app/models/edgarj/user_group_user.rb
edgarj-0.01.29 app/models/edgarj/user_group_user.rb
edgarj-0.01.28 app/models/edgarj/user_group_user.rb
edgarj-0.01.27 app/models/edgarj/user_group_user.rb
edgarj-0.01.26 app/models/edgarj/user_group_user.rb
edgarj-0.01.25 app/models/edgarj/user_group_user.rb
edgarj-0.01.24 app/models/edgarj/user_group_user.rb
edgarj-0.01.22 app/models/edgarj/user_group_user.rb
edgarj-0.01.21 app/models/edgarj/user_group_user.rb
edgarj-0.01.20 app/models/edgarj/user_group_user.rb
edgarj-0.01.19 app/models/edgarj/user_group_user.rb
edgarj-0.01.18 app/models/edgarj/user_group_user.rb
edgarj-0.01.17 app/models/edgarj/user_group_user.rb
edgarj-0.01.16 app/models/edgarj/user_group_user.rb
edgarj-0.01.15 app/models/edgarj/user_group_user.rb