Sha256: 262e8d8f89a89050fad940fd98cc8797bc2dd243cee8fa90cf5fbbe564b1ebd6

Contents?: true

Size: 689 Bytes

Versions: 18

Compression:

Stored size: 689 Bytes

Contents

# test that attr_readonly isn't called on the :taggable polymorphic association
module Taggable
end

class Tagging < ActiveRecord::Base
  belongs_to :tag, -> { includes(:tagging) }
  belongs_to :super_tag,   :class_name => 'Tag', :foreign_key => 'super_tag_id'
  belongs_to :invalid_tag, :class_name => 'Tag', :foreign_key => 'tag_id'
  belongs_to :blue_tag, -> { where :tags => { :name => 'Blue' } }, :class_name => 'Tag', :foreign_key => :tag_id
  belongs_to :tag_with_primary_key, :class_name => 'Tag', :foreign_key => :tag_id, :primary_key => :custom_primary_key
  belongs_to :taggable, :polymorphic => true, :counter_cache => :tags_count
  has_many :things, :through => :taggable
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
ibm_db-5.2.0 test/models/tagging.rb
ibm_db-5.1.0 test/models/tagging.rb
ibm_db-5.0.5 test/models/tagging.rb
ibm_db-5.0.4 test/models/tagging.rb
ibm_db-5.0.3 test/models/tagging.rb
ibm_db-5.0.2 test/models/tagging.rb
ibm_db-4.0.0-x86-mingw32 test/models/tagging.rb
ibm_db-4.0.0 test/models/tagging.rb
ibm_db-3.0.4-x86-mingw32 test/models/tagging.rb
ibm_db-3.0.4 test/models/tagging.rb
ibm_db-3.0.3-x86-mingw32 test/models/tagging.rb
ibm_db-3.0.3 test/models/tagging.rb
ibm_db-3.0.2-x86-mingw32 test/models/tagging.rb
ibm_db-3.0.2 test/models/tagging.rb
activejob-lock-0.0.2 rails/activerecord/test/models/tagging.rb
ibm_db-3.0.1 test/models/tagging.rb
ibm_db-3.0.1-x86-mingw32 test/models/tagging.rb
activejob-lock-0.0.1 rails/activerecord/test/models/tagging.rb