Skip to content

Commit

Permalink
added missing data_mapper initializer in will_paginate/railtie
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Schirp committed Apr 21, 2010
1 parent ec33678 commit 4082463
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/will_paginate/railtie.rb
Expand Up @@ -9,13 +9,20 @@ class Railtie < Rails::Railtie
WillPaginate::Finders::ActiveRecord.enable!
end
end


initializer "will_paginate.data_mapper" do |app|
if defined? ::DataMapper
require 'will_paginate/finders/data_mapper'
end
end


initializer "will_paginate.action_dispatch" do |app|
if defined? ::ActionDispatch::ShowExceptions
ActionDispatch::ShowExceptions.rescue_responses['WillPaginate::InvalidPage'] = :not_found
end
end

initializer "will_paginate.action_view" do |app|
require 'will_paginate/view_helpers/action_view'
ActionView::Base.send(:include, WillPaginate::ViewHelpers::ActionView)
Expand Down

0 comments on commit 4082463

Please sign in to comment.