Passing params - routes

I think routes are messing up data that I am trying to pass between
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

Then again, I could be way off in the original link_to statement.

The code is pretty much stock stuff.

Any ideas?

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

On Sun, Mar 30, 2008 at 8:09 AM, Sunny B. [email protected]

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
<%= f.hidden_field :product_id, :value => params[:product]%>

On Sat, Mar 29, 2008 at 10:46 PM, bala kishore pulicherla <

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


On Sun, Mar 30, 2008 at 8:45 AM, Sunny B. [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs