Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ActionView::Helpers::UrlHelper.class_eval do
- unless method_defined?(:url_for_without_locale)
- def url_for_with_locale(options = {})
- case options
- when Hash
- url_for_without_locale(options.merge({:locale => I18n.locale.to_s}))
- else
- url_for_without_locale(options)
- end
- end
- alias_method_chain :url_for, :locale
- end
- end
Add Comment
Please, Sign In to add comment