Sha256: 2d0e27c769526f26fc711e9eadf4b071f0ad4162c74523001b85f5ac63b84de4
Contents?: true
Size: 670 Bytes
Versions: 5
Compression:
Stored size: 670 Bytes
Contents
class Category < ActiveRecord::Base has_and_belongs_to_many :posts has_and_belongs_to_many :special_posts, :class_name => "Post" has_and_belongs_to_many :hello_posts, :class_name => "Post", :conditions => "\#{aliased_table_name}.body = 'hello'" has_and_belongs_to_many :nonexistent_posts, :class_name => "Post", :conditions=>"\#{aliased_table_name}.body = 'nonexistent'" def self.what_are_you 'a category...' end has_many :categorizations has_many :authors, :through => :categorizations, :select => 'authors.*, categorizations.post_id' end class SpecialCategory < Category def self.what_are_you 'a special category...' end end
Version data entries
5 entries across 5 versions & 1 rubygems