Sha256: 6a49525702884652f500b901d711e8cc9934e0e08c6d2dea592d0af9b8c672e7

Contents?: true

Size: 753 Bytes

Versions: 16

Compression:

Stored size: 753 Bytes

Contents

class Categorization < ActiveRecord::Base
  belongs_to :post
  belongs_to :category, counter_cache: true
  belongs_to :named_category, :class_name => 'Category', :foreign_key => :named_category_name, :primary_key => :name
  belongs_to :author

  has_many :post_taggings, :through => :author, :source => :taggings

  belongs_to :author_using_custom_pk,  :class_name => 'Author', :foreign_key => :author_id, :primary_key => :author_address_extra_id
  has_many   :authors_using_custom_pk, :class_name => 'Author', :foreign_key => :id,        :primary_key => :category_id
end

class SpecialCategorization < ActiveRecord::Base
  self.table_name = 'categorizations'
  default_scope { where(:special => true) }

  belongs_to :author
  belongs_to :category
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
ibm_db-5.2.0 test/models/categorization.rb
ibm_db-5.1.0 test/models/categorization.rb
ibm_db-5.0.5 test/models/categorization.rb
ibm_db-5.0.4 test/models/categorization.rb
ibm_db-5.0.3 test/models/categorization.rb
ibm_db-5.0.2 test/models/categorization.rb
ibm_db-4.0.0-x86-mingw32 test/models/categorization.rb
ibm_db-4.0.0 test/models/categorization.rb
ibm_db-3.0.4-x86-mingw32 test/models/categorization.rb
ibm_db-3.0.4 test/models/categorization.rb
ibm_db-3.0.3-x86-mingw32 test/models/categorization.rb
ibm_db-3.0.3 test/models/categorization.rb
ibm_db-3.0.2-x86-mingw32 test/models/categorization.rb
ibm_db-3.0.2 test/models/categorization.rb
ibm_db-3.0.1 test/models/categorization.rb
ibm_db-3.0.1-x86-mingw32 test/models/categorization.rb