Module: LocalizedUrlFor

Defined in:
lib/localized_url_for.rb,
lib/localized_url_for/version.rb

Constant Summary collapse

VERSION =
"0.0.4"

Instance Method Summary collapse

Instance Method Details

#url_for_with_locale(options) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/localized_url_for.rb', line 5

def url_for_with_locale(options)
  localized_options = options
  if options.kind_of?(Hash)
    localized_options[:locale] ||= I18n.locale
  end
  url_for_without_locale(localized_options)
end