09 Oct '13, 11am

Sprockets::Helpers

require 'sinatra/base' require 'sprockets' require 'sinatra/sprockets-helpers' class App < Sinatra::Base set :sprockets, Sprockets::Environment.new(root) set :assets_prefix, '/assets' set :digest_assets, false configure do sprockets.append_path File.join(root, 'assets', 'stylesheets') sprockets.append_path File.join(root, 'assets', 'javascripts') sprockets.append_path File.join(root, 'assets', 'images') end register Sinatra::Sprockets::Helpers get '/' do erb :index end end

Full article: http://rubyflow.ru/items/1435

Tweets