lib/roda/plugins/assets.rb in roda-1.3.0 vs lib/roda/plugins/assets.rb in roda-2.0.0
- old
+ new
@@ -394,11 +394,11 @@
# file. Dirs should be an array of asset group names, if these
# are files in an asset group.
def compile_assets_files(files, type, dirs)
dirs = nil if dirs && dirs.empty?
o = assets_opts
- app = new
+ app = allocate
content = files.map do |file|
file = "#{dirs.join('/')}/#{file}" if dirs && o[:group_subdirs]
file = "#{o[:"#{type}_path"]}#{file}"
app.read_asset_file(file, type)
@@ -546,10 +546,10 @@
end
# Render the given asset file using the render plugin, with the given options.
# +file+ should be the relative path to the file from the current directory.
def render_asset_file(file, options)
- render({:path => file}, options)
+ render_template({:path => file}, options)
end
end
module RequestClassMethods
# An array of asset type strings and regexps for that type, for all asset types