you can always try this when you have that kind of problem:
In your controller:
def whatever
flash[:notice] = params
redirect_to back
end
this will print the params hash if you have a flash message div set up. The
original way of doing this is by looking at the console, and looking at the
hash that gets send.
Parameters: {"utf8"=>"✓", "authenticity_token"=>"lol_omg",
"order_details"=>{"send_to"=>"my_house", "product_id"=>"2"}}
usually in the controller you access this hash like this:
params[:order_detail]
where
params[:order_detail] is "order_details"=>{"send_to"=>"my_house",
"product_id"=>"2"} and params[:order_details] will return
{"send_to"=>"my_house", "product_id"=>"2"}
so putting params into the flash will send back all the params and that will
let you see what parameters and send and how to access them.
--
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.