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

Merge pull request #332 from hooktstudios/sinatra-views

Add support for Sinatra views overrides (add app views paths)
This commit is contained in:
Uchio KONDO 2013-03-07 01:10:08 -08:00
commit 5f62aa5966

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)