Sha256: 66a86ecca8bb4e89311d7dea96d51aa19c026cc9e58c122ecb1fe0862679a678

Contents?: true

Size: 848 Bytes

Versions: 1

Compression:

Stored size: 848 Bytes

Contents

module Inkwell
  if ::Inkwell::Engine::config.respond_to?('community_table')
    class CommunityUser < ActiveRecord::Base
      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

1 entries across 1 versions & 1 rubygems

Version Path
inkwell-2.0.0 app/models/inkwell/community_user.rb