Hello everyone Trying to use restful_authentication in my project. country_id,state_id,city_id is the attributes of the user model. I specified the relation has_many :users in in three of the model files and in the user model file specified as belongs_to :country_id,belongs_to :state_id,belongs_to :city_id. After that when i tried to save user model error "undefined method `to_sym' for #<State:0x667b258>" . when I remove the relation I can save the user model . Where I am going wrong? is it possible to specify relation ? Pls help. Thanks in advance.
on 2009-03-19 15:05
on 2009-03-19 15:28
the user shouldn't belong to a state, the user should have_one :state and also your belongs to should be :state not :state_id
on 2009-03-19 15:52
David Herman wrote: > the user shouldn't belong to a state, the user should have_one :state > > and also your belongs to should be :state not :state_id Corrected the relation but the problem is existing