0

I have the following piece of ruby code:

authenticate_this(request.env["SOME_ID"])

What I want to know is how do I place this "SOME_ID" within the HTTP GET request. From what I understand, these rails request parameters are preset? If so what is the "SOME_ID"?

Thanks

ace
  • 189
  • 1
  • 1
  • 9

1 Answers1

0

Rails request parameters are available in the params hash. Put this next line in your ERB

= debug params

This line will tell you all about the params hash. Key values include

params[:id]
params[:object_id] # In a route like users/1/listings/1, this would be params[:user_id]
params[:form_contents] # the contents of a form are available in params
OneChillDude
  • 7,856
  • 10
  • 40
  • 79