lib/pagers.rb in pagers-3.1.5 vs lib/pagers.rb in pagers-4.0.0.0

- old
+ new

@@ -1,26 +1,21 @@ -require 'pagers/action_view/base' -require 'pagers/active_record/base' -require 'pagers/active_record/relation' +require 'pagers/extensions/action_view/base' +require 'pagers/extensions/active_record/base' +require 'pagers/extensions/active_record/relation' +require 'pagers/configuration' require 'pagers/engine' require 'pagers/railtie' +require 'pagers/version' module Pagers class << self def configure - yield config + yield configuration end - def config - @config ||= begin - ActiveSupport::OrderedOptions.new.tap do |config| - config.length = 20 - config.padding = 0 - config.parameter = :page - config.pages = 5 - end - end + def configuration + @configuration ||= Configuration.new end end end