Hello,

I am having some trouble with the homework. I was able to get the
validation working, and everything works fine and saves to the
database. The only problem I have is that the address field gets saved
with !map:HashWithIndifferentAccess appended in front of it, and I
can't figure out why. This is a snippet of the log file:

Processing HelloController#address (for 127.0.0.1 at 2009-06-15
11:02:18) [POST]
  Session ID: ae38490563b1e84e65f8b7718dc7710b
  Parameters:
{"authenticity_token"=>"5c58d4cf76d71273841407c5632357e7850a19c9",
"user"=>{"address"=>"45 tree ave"}, "commit"=>"Submit",
"controller"=>"hello", "action"=>"address"}
   [4;36;1mUser Columns (0.003809) [0m    [0;1mSHOW FIELDS FROM
`users` [0m
   [4;35;1mSQL (0.000408) [0m    [0mBEGIN [0m
   [4;36;1mUser Create (0.000588) [0m    [0;1mINSERT INTO `users`
(`name`, `age`, `created_at`, `updated_at`, `hobby`, `address`) VALUES
('john', 64, '2009-06-15 15:02:18', '2009-06-15 15:02:18', 'street',
'--- !map:HashWithIndifferentAccess \naddress: 45 tree ave\n') [0m
   [4;35;1mSQL (0.000704) [0m    [0mCOMMIT [0m
Redirected to http://localhost:8081/hello/list

I did a bit of googling and found someones suggestion to access the
address only by using params[:user][:address].to_s but it didnt work,
so I am stuck. Any help would be appreciated.

Thanks.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "ruby-on-rails-programming-with-passion" group.
To unsubscribe from this group, send email to
ruby-on-rails-programming-with-passion-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/ruby-on-rails-programming-with-passion?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to