HELP: NoMethodError (undefined method `stringify_keys!' for


#1

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


#2

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?