Sha256: 5c89464f223ca0ad2b5d04c20a128929b20707c70b70d206d96a6a56f7530d61

Contents?: true

Size: 812 Bytes

Versions: 7

Compression:

Stored size: 812 Bytes

Contents

# Copyright (c) 2008-2013 Michael Dvorkin and contributors.
#
# Fat Free CRM is freely distributable under the terms of MIT license.
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
#------------------------------------------------------------------------------
# == Schema Information
#
# Table name: permissions
#
#  id         :integer         not null, primary key
#  user_id    :integer
#  asset_id   :integer
#  asset_type :string(255)
#  created_at :datetime
#  updated_at :datetime
#

class Permission < ActiveRecord::Base
  belongs_to :user
  belongs_to :group
  belongs_to :asset, polymorphic: true

  validates_presence_of :user_id, unless: :group_id?
  validates_presence_of :group_id, unless: :user_id?

  ActiveSupport.run_load_hooks(:fat_free_crm_permission, self)
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
fat_free_crm-0.14.2 app/models/users/permission.rb
fat_free_crm-0.14.1 app/models/users/permission.rb
fat_free_crm-0.15.0.beta.2 app/models/users/permission.rb
fat_free_crm-0.15.0.beta app/models/users/permission.rb
fat_free_crm-0.14.0 app/models/users/permission.rb
reduced_fat_crm-0.15.0.beta app/models/users/permission.rb
reduced_fat_crm-0.14.0 app/models/users/permission.rb