Sha256: 851e4fdc28a1429695420d3e95b02d08d6222e69956d9f4c00c33bb63fa57028

Contents?: true

Size: 728 Bytes

Versions: 2

Compression:

Stored size: 728 Bytes

Contents

class Categorization < ActiveRecord::Base
  belongs_to :post
  belongs_to :category
  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

2 entries across 2 versions & 1 rubygems

Version Path
activerecord-nuodb-adapter-2.0.3 test/models/categorization.rb
activerecord-nuodb-adapter-2.0 test/models/categorization.rb