module Fanforce::Plugin::Sinatra::AssetHelpers
def stylesheet(src)
src += '.css' unless src.include?('.css')
src = asset_path(src) unless src =~ /^https?:\// or src =~ /^\/\/.+/
""
end
def javascript(src, &block)
src += '.js' unless src.include?('.js')
src = asset_path(src) unless src =~ /^https?:\// or src =~ /^\/\/.+/
""
end
def asset_path(source, options={})
source = ('/assets/' + source).gsub('//', '/').gsub('/assets/assets/', '/assets/')
end
def image_path(source)
asset_path(source)
end
end