lib/linner/asset.rb in linner-0.5.0 vs lib/linner/asset.rb in linner-0.5.1
- old
+ new
@@ -49,11 +49,15 @@
end
def wrap(source)
if javascript?
Wrapper::Module.wrap(logical_path.chomp(File.extname logical_path), source)
- else
- Wrapper::Template.wrap(logical_path.chomp(File.extname logical_path), source)
+ elsif template?
+ if File.basename(path).start_with?("_")
+ Wrapper::Template.partial_wrap(logical_path.chomp(File.extname logical_path), source)
+ else
+ Wrapper::Template.wrap(logical_path.chomp(File.extname logical_path), source)
+ end
end
end
def javascript?
Tilt[path] and Tilt[path].default_mime_type == "application/javascript"