Sha256: 97ef5e02cdcfe6749e944ce5955c68f9ba02126cf6ef89f00fb7c98df31a0bbe
Contents?: true
Size: 833 Bytes
Versions: 1
Compression:
Stored size: 833 Bytes
Contents
require 'will_paginate' require 'will_paginate/collection' require 'will_paginate/i18n' module WillPaginate class Railtie < Rails::Railtie initializer "will_paginate" do |app| ActiveSupport.on_load :active_record do require 'will_paginate/active_record' end ActiveSupport.on_load :action_controller do WillPaginate::Railtie.setup_actioncontroller end ActiveSupport.on_load :action_view do require 'will_paginate/view_helpers/action_view' end self.class.add_locale_path config end def self.setup_actioncontroller ActionDispatch::ShowExceptions.rescue_responses['WillPaginate::InvalidPage'] = :not_found end def self.add_locale_path(config) config.i18n.railties_load_path.unshift(*WillPaginate::I18n.load_path) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
will_paginate-3.0.0 | lib/will_paginate/railtie.rb |