Getting values


#1

What if I have this URL on my browser’s address bar?

http://www.mysite.com/controller/rhtml/3

How can I put the “3” as a value inside the controller.

Thanks,

Jeremy


#2

anyone knows the answer to my question???


#3

Jeremy wrote:

anyone knows the answer to my question???

params[:id] should contain the value you need


#4

Jeremy wrote:

Not sure I’m understanding you correctly but if you have a URL

http://www.mysite.com/my_controller/some_action/3

Then the 3 is available in the action “some_action” in controller
“my_controller” by params[:id]

HTH