Robbie Done
Robbie Done

Reputation: 1157

Passing parameters to a rails 3 form

Is there a way i can pass a value to a form from another page?

In Classic ASP i Would possibly do it via a querystring like - http://www.yoursite.com?id=123

then the form value would be - <%=Request.QueryString("id")%>

I basically need to pass an id from a button to a form.

Upvotes: 0

Views: 182

Answers (1)

lucapette
lucapette

Reputation: 20724

You're looking for the params hash. You could do something like:

<%= params[:id] %>

Upvotes: 1

Related Questions