Module: KirguduBase::UrlHelper
- Included in:
- ApplicationController
- Defined in:
- app/helpers/kirgudu_base/url_helper.rb
Instance Method Summary collapse
Instance Method Details
#url_for(options = nil) ⇒ Object
11 12 13 14 15 16 |
# File 'app/helpers/kirgudu_base/url_helper.rb', line 11 def url_for( = nil) if .kind_of?(Hash) && .has_key?(:subdomain) [:host] = with_subdomain(.delete(:subdomain)) end super end |
#with_subdomain(subdomain) ⇒ Object
5 6 7 8 9 |
# File 'app/helpers/kirgudu_base/url_helper.rb', line 5 def with_subdomain(subdomain) subdomain = (subdomain || "") subdomain += "." unless subdomain.empty? [subdomain, request.domain].join end |