Archive for the ruby on rails Category

!map:HashWithIndifferentAccess

Monday, April 23rd, 2007 | Permalink

i got some errors on my ruby on rails project, when i tried to get strings from two different hashes.

it catched all the data, but it added always !map:HashWithIndifferentAccess in front of my data.

i solved that by doing a little trick.

comment.title = params[:title]

and changed it so use only the data from the hash i want to use

comment.title = params[:title][:thefieldiwanttouse].to_s