diff --git a/lib/kaminari/helpers/sinatra_helpers.rb b/lib/kaminari/helpers/sinatra_helpers.rb index 9a6f314..23a844e 100644 --- a/lib/kaminari/helpers/sinatra_helpers.rb +++ b/lib/kaminari/helpers/sinatra_helpers.rb @@ -10,6 +10,11 @@ module Kaminari::Helpers def registered(app) app.register Padrino::Helpers app.helpers HelperMethods + @app = app + end + + def view_paths + @app.views end alias included registered @@ -31,6 +36,7 @@ module Kaminari::Helpers def render(*args) base = ActionView::Base.new.tap do |a| + a.view_paths << SinatraHelpers.view_paths a.view_paths << File.expand_path('../../../../app/views', __FILE__) end base.render(*args)