logo       

[Rails] Undefined method updated? for <model object>: msg#03221

RubyonRailsTalk

Subject: [Rails] Undefined method updated? for <model object>

Hi,
I have two model say-
 
ZipCode < ActiveRecord::Base
belongs_to :state_provinces
end

StateProvince < ActiveRecord::Base
has_many :zip_codes
end

if I do @zip_code.update_atribute(:city, "My City")
its giving Undefined method updated? for StateProvince

if I remove belongs_to specifier in ZipCode class then it work fine.
Any alternate solution??

Thanks
--
Regards,
Himanshu

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@xxxxxxxxxxxxxxxx
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | Mail Home | sitemap | FAQ | advertise