Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save hemalich/785979 to your computer and use it in GitHub Desktop.

Select an option

Save hemalich/785979 to your computer and use it in GitHub Desktop.
Setting the Locale from the URL Params default_url_options
# app/controllers/application_controller.rb
def default_url_options(options={})
logger.debug "default_url_options is passed options: #{options.inspect}\n"
{ :locale => I18n.locale }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment