]> git.openstreetmap.org Git - rails.git/blob - vendor/gems/composite_primary_keys-1.1.0/test/fixtures/user.rb
Patch composite_primary_keys to work around issue when one component of
[rails.git] / vendor / gems / composite_primary_keys-1.1.0 / test / fixtures / user.rb
1 class User < ActiveRecord::Base\r
2   has_many :readings\r
3   has_many :articles, :through => :readings\r
4   has_many :comments, :as => :person\r
5   has_many :hacks, :through => :comments, :source => :hack\r
6   \r
7   def find_custom_articles\r
8     articles.find(:all, :conditions => ["name = ?", "Article One"])\r
9   end\r
10 end\r