Sha256: d67a225bcd37b4ea602fe47cc347055506da33b1a404458d4a38fc522690b0a0

Contents?: true

Size: 1.16 KB

Versions: 6

Compression:

Stored size: 1.16 KB

Contents

class Post < ActiveRecord::Base
  include ArelHelpers::ArelTable
  include ArelHelpers::Aliases
  has_many :comments
  has_many :favorites
end

class Comment < ActiveRecord::Base
  include ArelHelpers::ArelTable
  include ArelHelpers::Aliases
  belongs_to :post
  belongs_to :author
end

class Author < ActiveRecord::Base
  include ArelHelpers::ArelTable
  include ArelHelpers::Aliases
  has_one :comment
  has_and_belongs_to_many :collab_posts
end

class Favorite < ActiveRecord::Base
  include ArelHelpers::ArelTable
  include ArelHelpers::Aliases
  belongs_to :post
end

class CollabPost < ActiveRecord::Base
  include ArelHelpers::ArelTable
  include ArelHelpers::Aliases
  has_and_belongs_to_many :authors
end

class Card < ActiveRecord::Base
  has_many :card_locations
end

class CardLocation < ActiveRecord::Base
  belongs_to :location
  belongs_to :card, polymorphic: true
end

class Location < ActiveRecord::Base
  has_many :card_locations
  has_many :community_tickets, through: :card_locations, source: :card, source_type: 'CommunityTicket'
end

class CommunityTicket < ActiveRecord::Base
  has_many :card_locations, as: :card
  has_many :locations, through: :card_locations
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
arel-helpers-2.16.0 spec/env/models.rb
arel-helpers-2.15.0 spec/env/models.rb
arel-helpers-2.14.0 spec/env/models.rb
arel-helpers-2.13.0 spec/env/models.rb
arel-helpers-2.12.1 spec/env/models.rb
arel-helpers-2.12.0 spec/env/models.rb