# HELP: NoMethodError (undefined method \`stringify\_keys!' for

**URL:** <https://www.ruby-forum.com/t/help-nomethoderror-undefined-method-stringify-keys-for/52957>\
**Category:** Rails\
**Created:** [January 21, 2006, 2:13pm UTC](https://www.ruby-forum.com/t/help-nomethoderror-undefined-method-stringify-keys-for/52957 "2006-01-21T14:13:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tom](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/3d9bf3/32.png) [@tom](https://www.ruby-forum.com/u/tom)\
**Post date:** [January 21, 2006, 2:13pm UTC](https://www.ruby-forum.com/t/help-nomethoderror-undefined-method-stringify-keys-for/52957/1 "2006-01-21T14:13:44Z")

</div>

We have a flash developer who is intergating with a rails application  
when  
he posts a particular variable (in this case ‘rating’) We get a ‘Rails  
Application  
Error’ Trawling the production log turns up this error;

NoMethodError (undefined method `stringify\_keys!’ for “10”:String):

The html wireframe has no such problem. A select box is used to submit  
the data  
in the style of.

rating[rating]

Here is the ‘def’ in the controller;

def rate  
dream = User.find(params[:id])  
rating = Rating.new(params[:rating])

```
# Create or Update rating cookie
if !cookies[:rating]
  cookies[:rating] = { :value => User.sha1(@request.remote_ip + 

```

Time.now.to\_s), :expires =\> Time.now + 31449600}  
else  
cookies[:rating] = { :value =\> cookies[:rating], :expires =\>  
Time.now + 31449600}  
end  
rating.cookie = cookies[:rating]  
dream.ratings \<\< rating  
if dream.update  
flash[:notice] = ‘Rating was added to this dream.’  
redirect\_to :action =\> ‘show’, :id =\> dream  
else  
render :action =\> ‘show’  
end  
end

Is there something wrong with submiting a post variable called ‘rating’  
in this way is there another method that im missing?

Thanks in advance.

T

---

<div class="post-metadata">

**Author:** ![tom](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/3d9bf3/32.png) [@tom](https://www.ruby-forum.com/u/tom)\
**Post date:** [January 21, 2006, 3:33pm UTC](https://www.ruby-forum.com/t/help-nomethoderror-undefined-method-stringify-keys-for/52957/2 "2006-01-21T15:33:46Z")

</div>

Tom wrote:

> We have a flash developer who is intergating with a rails application  
> when  
> he posts a particular variable (in this case ‘rating’) We get a ‘Rails  
> Application  
> Error’ Trawling the production log turns up this error;
> 
> NoMethodError (undefined method `stringify\_keys!’ for “10”:String):
> 
> The html wireframe has no such problem. A select box is used to submit  
> the data  
> in the style of.
> 
> rating[rating]

Which line is the error on, and what does your param hash look like?
