Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (21 sloc) 0.765 kb
require 'will_paginate'
require 'will_paginate/collection'
module WillPaginate
class Railtie < Rails::Railtie
initializer "will_paginate" do |app|
ActiveSupport.on_load :active_record do
require 'will_paginate/active_record'
WillPaginate::ActiveRecord.setup
end
ActiveSupport.on_load :action_controller do
ActionDispatch::ShowExceptions.rescue_responses['WillPaginate::InvalidPage'] = :not_found
end
ActiveSupport.on_load :action_view do
require 'will_paginate/view_helpers/action_view'
include WillPaginate::ActionView
end
locale_path = File.expand_path('../locale', __FILE__)
config.i18n.railties_load_path.concat Dir["#{locale_path}/*.{rb,yml}"]
end
end
end
Jump to Line
Something went wrong with that request. Please try again.