Rails 3 and 2.3.8 fail to save a model called "Update" -
i have this:
class update < activerecord::base has_many :comments end class comment < activerecord::base belongs_to :update end
update.first gives:
#<update id: 1, body: "update 1", ...>
comment.first gives:
#<comment id: 1, update_id: 1, body: "comment 1", ...>
when doing this:
comment.first.update_attribute(:body,"this fails saved")
and comment still contains "comment 1" i.e. record silently fails updated.
now comes weirdest part. when remove 'belongs_to :update' comment update_attribute method succeeds.
any ideas?
Comments
Post a Comment