[Rails] Get current url
Hi friends,
-- i need current url in rails environment file.
i can get current url in conroller by the below command.
request.env['HTTP_HOST']
and now i want get current url in environment.rb file or intializer folder files
Regards,
Daya.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CADKeJySvxfocH15Z_WON1aqW_11%2BohiAzXSpBVe1FcgsGmt1eA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home