Skip to content

Commit

Permalink
Revert "An Engine can include app/helpers, so let's move the helpers …
Browse files Browse the repository at this point in the history
…there"

This reverts commit 2ed8adf.

reason: Because mounted engines on the app doesn't search the main_app's helpers, then throws "undefined method `paginate'" in the views
  • Loading branch information
amatsuda committed Nov 9, 2013
1 parent 3e1171e commit 6cbd2d5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
5 changes: 0 additions & 5 deletions app/helpers/kaminari_helper.rb

This file was deleted.

1 change: 1 addition & 0 deletions lib/kaminari.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ module Kaminari

# load Kaminari components
require 'kaminari/config'
require 'kaminari/helpers/action_view_extension'
require 'kaminari/helpers/paginator'
require 'kaminari/models/page_scope_methods'
require 'kaminari/models/configuration_methods'
Expand Down
4 changes: 4 additions & 0 deletions lib/kaminari/hooks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ def self.init
::Plucky::Query.send :include, Kaminari::PluckyCriteriaMethods
end
require 'kaminari/models/array_extension'

ActiveSupport.on_load(:action_view) do
::ActionView::Base.send :include, Kaminari::ActionViewExtension
end
end
end
end

0 comments on commit 6cbd2d5

Please sign in to comment.