1
0
Fork 0
mirror of https://github.com/kaminari/kaminari.git synced 2022-11-09 13:44:37 -05:00

Add support for Sinatra views overrides (add app views paths)

This commit is contained in:
Jean-Philippe Doyle 2013-01-05 18:39:07 -05:00
parent 2e09b5374f
commit 63b6f74d06

View file

@ -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)