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
Exchange 5.5 - How to setup a smarthost to provide Pop3 access, without mailboxes
Create unattended installation of Office 2003 Sp2,Winxp sp2,Win 2003 sp1 and sp2
Why access 2007 ignore the code which access 2003 executes?
Multiple word Search statement
Powershell function to create an excel spreadsheet multiple sheets - and ApproveIt on workstation
How to install rsyslogd?
Customise buttons in Word - Macro button icons - Export from word 2003 into Word 2007
citrix license server issue
Auto-populate KEYWORDS to xml file
concat 2 columns in a select