Microsoft
Software
Hardware
Network
Question : Rails: How do I get the domain name
Is there an easy way to get the domain name of where something was called from?
For example, if I have the same app that is linked to both
www.somesite.com
and
www.somesite.net
, is there an easy way to find out which one the user is clicking through to use the app?
Thanks,
Grant
Answer : Rails: How do I get the domain name
ActionController.host()
http://api.rubyonrails.com
/classes/A
ctionContr
oller/
Abst
ractReques
t.html#M00
0413
1: 2: 3: 4: 5:
Controller @host = request.host View <%= @host %>
Open in New Window
Select All
Random Solutions
*.exe is not a valid Win32 application - but ok in safe mode XP Pro
Python: how to retrieve substring from file name
571 Unable to determine MX host for ...
Multiple schemas .vs. single schema
IE file associations
Matching data from two Worksheets, and highlighting matching rows
POP3 Connector Manager with MMC 3.0: 'MMC has detected an error in a snap-in'
Good open source dating software packages.
Internet Marketing: Paid Surveys : real or scam
Moving VHD to a 2008 Hyper-V Server