lib/will_paginate/railtie.rb in will_paginate-3.0.9 vs lib/will_paginate/railtie.rb in will_paginate-3.0.10
- old
+ new
@@ -16,12 +16,10 @@
ActiveSupport.on_load :action_view do
require 'will_paginate/view_helpers/action_view'
end
- self.class.add_locale_path config
-
# early access to ViewHelpers.pagination_options
require 'will_paginate/view_helpers'
end
def self.setup_actioncontroller
@@ -29,14 +27,10 @@
ActionDispatch::ExceptionWrapper : ActionDispatch::ShowExceptions
).send :include, ShowExceptionsPatch
ActionController::Base.extend ControllerRescuePatch
end
- def self.add_locale_path(config)
- config.i18n.load_path.unshift(*WillPaginate::I18n.load_path)
- end
-
# Extending the exception handler middleware so it properly detects
# WillPaginate::InvalidPage regardless of it being a tag module.
module ShowExceptionsPatch
extend ActiveSupport::Concern
included do
@@ -66,6 +60,10 @@
end
super(*args, &block)
end
end
end
+end
+
+ActiveSupport.on_load :i18n do
+ I18n.load_path.concat(WillPaginate::I18n.load_path)
end