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
Excel 2000 spreadsheets from Windows Explorer won't open unless I already have an Excel document open.
Remote Desktop after installing XP SP3 Error
PowerShell and .NET - Calling Methods
boot disk in XP pro
Converting Powerpoint animation to GIf
Other Languages / Arabic support for Windows Mobile
Set Up For Ghost Casting
medical supplies dropshipper
How to create a boot floopy disk to boot cd
Outlook Web Access 2003-Inbox problem/ Invalid procedure call or argument