Current_path?

What’s the best way to retrieve the current path? (i.e. /posts/1)

Take a look at the request object:

http://guides.rubyonrails.org/action_controller_overview.html#the-request-object

Best Regards,

Everaldo

Hi!

I forgot to say to look in the params hash:

http://guides.rubyonrails.org/action_controller_overview.html#routing-parameters

Everaldo

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