]> git.openstreetmap.org Git - rails.git/blob - vendor/gems/composite_primary_keys-2.2.2/test/fixtures/user.rb
Add version 2.2.2 of composite_primary_keys.
[rails.git] / vendor / gems / composite_primary_keys-2.2.2 / 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