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 Mar 19, 10:05 am, Indu RS <[email protected]> wrote:
> 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.
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to