Url For Domain plugin
Plugin details
Documentation
Install the plugin:
ruby script/plugin install https://fngtps.com/svn/rails-plugins/trunk/url_for_domain/
Examples (normal domain is example.com):
url_for(:subdomain => 'manfred') #=> '' url_for(:subdomain => 'manfred', :only_path => false) #=> 'http://manfred.example.com/' url_for(:subdomain => 'manfred', :only_path => false) #=> 'http://manfred.example.com/' url_for(:subdomain => false, :only_path => false) #=> 'http://example.com/'
When the domain is 'example.co.uk'
url_for(:subdomain => 'manfred', :only_path => false) #= 'http://manfred.co.uk' url_for(:subdomain => 'manfred', :tld_length => 2, :only_path => false) #= 'http://manfred.example.co.uk'
Further Documentation
There is currently no advanced documentation for this plugin.
New documentationEdit plugin | (0 older versions) | Last edited by: hardway, over 2 years ago


