Sha256: 4c3cb99c1315e5c1abd4474ecd71b799ec7c0cd3392710651fc2a7f10167e355

Contents?: true

Size: 1.09 KB

Versions: 3

Compression:

Stored size: 1.09 KB

Contents

module Inkwell
  if ::Inkwell::Engine::config.respond_to?('community_table')
    class CommunityUser < ActiveRecord::Base
      attr_accessible "#{::Inkwell::Engine::config.user_table.to_s.singularize}_id", "#{::Inkwell::Engine::config.community_table.to_s.singularize}_id",
                      :is_writer, :is_admin, :admin_level, :muted, :user_access, :active, :banned, :asked_invitation
      belongs_to ::Inkwell::Engine::config.community_table.to_s.singularize.to_sym
      belongs_to ::Inkwell::Engine::config.user_table.to_s.singularize.to_sym
      belongs_to :admins, :foreign_key => "#{::Inkwell::Engine::config.user_table.to_s.singularize}_id"
      belongs_to :writers, :foreign_key => "#{::Inkwell::Engine::config.user_table.to_s.singularize}_id"
      belongs_to :muted_users, :foreign_key => "#{::Inkwell::Engine::config.user_table.to_s.singularize}_id"
      belongs_to :banned_users, :foreign_key => "#{::Inkwell::Engine::config.user_table.to_s.singularize}_id"
      belongs_to :asked_invitation_users, :foreign_key => "#{::Inkwell::Engine::config.user_table.to_s.singularize}_id"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
inkwell-1.5.2 app/models/inkwell/community_user.rb
inkwell-1.5.1 app/models/inkwell/community_user.rb
inkwell-1.4.1 app/models/inkwell/community_user.rb