Hi all,
I want something like action_name in my controller which could store
the current path, say /categories/1;edit. Is there any way to get
this? Thanks.
allen
Hi all,
I want something like action_name in my controller which could store
the current path, say /categories/1;edit. Is there any way to get
this? Thanks.
allen
allen wrote:
Hi all,
I want something like action_name in my controller which could store
the current path, say /categories/1;edit. Is there any way to get
this? Thanks.allen
There’s lots of interesting stuff to be found in the ENV hash. Such
as…
ENV[‘REQUEST_PATH’]
Is there a list anywhere of what all is usually in ENV?
Thanks!
[email protected] wrote:
Is there a list anywhere of what all is usually in ENV?
Thanks!
It depends on your sever setup, but doesn’t usually change unless the
admin responsible for the server changes it. Try pasting this
temporarily in one of your views…
ENV
request.env
That should give you a list of everything currently available. Note
that I originally forgot about ‘request.env’ which provides some more
info.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs