passing params - routes

I think routes are messing up data that I am trying to pass between showing a product and entering a review.

In the product/show view I have:

<%= link_to ‘Add a Review’, new_review_path, :xyz => %>

Inspecting the params of review/new there is nothing but {“action”=>“new”, “controller”=>“reviews”}

<%= link_to ‘Add a Review’, new_review_path(@product, :xyz => %>

bala kishore pulicherla wrote:

<%= link_to 'Add a Review', new_review_path(@product, :xyz => %>

I can't see the routes.rb, but ain't that just



Thanks, I got it to work with the following:

In the view sending the params information:
<%= link_to ‘Add a Review’, new_review_path(:product =>>

In the view receiving the params information and passing it to the controller.
<%= f.hidden_field :product_id, :value => params[:product]%>

opz i forgot to post some thing

in routes.rb
map.resources :products.each do |product|
product.resource :reviews

and in the view
<%= link_to ‘Add a Review’, new_product_reviews_path(@product,:product_d =>>