1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test/models/pirate.rb
Xavier Noria 593e21d6ae Dirty attributes aren't cleared if save fails. [#174 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-05-12 17:04:17 -07:00

9 lines
255 B
Ruby

class Pirate < ActiveRecord::Base
belongs_to :parrot
has_and_belongs_to_many :parrots
has_many :treasures, :as => :looter
has_many :treasure_estimates, :through => :treasures, :source => :price_estimates
validates_presence_of :catchphrase
end