Module: Sinatra::Rider::Pathing

Defined in:
lib/sinatra/rider/pathing.rb

Class Method Summary collapse

Class Method Details

.registered(app) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/sinatra/rider/pathing.rb', line 4

def self.registered(app)
  app.set :views, [app.settings.views, File.join(__dir__, 'views')].flatten

  app.helpers do
    def find_template(views, name, engine, &block)
      [*views].each { |v| super(v, name, engine, &block) }
    end
  end
end