Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 52 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. ActionView::Helpers::UrlHelper.class_eval do
  2.   unless method_defined?(:url_for_without_locale)
  3.     def url_for_with_locale(options = {})
  4.       case options
  5.       when Hash
  6.         url_for_without_locale(options.merge({:locale => I18n.locale.to_s}))
  7.       else
  8.         url_for_without_locale(options)
  9.       end
  10.     end
  11.    
  12.     alias_method_chain :url_for, :locale
  13.   end
  14. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top