app/controllers/barista_controller.rb in barista-0.2.1 vs app/controllers/barista_controller.rb in barista-0.3.0
- old
+ new
@@ -6,11 +6,11 @@
def show
headers['Content-Type'] = "application/javascript"
path = normalize_path(params[:js_path])
p path
return head(:forbidden) unless can_render_path?(path)
- compiled = Barista.render_path(path)
+ compiled = Barista.compile_file!(path)
compiled.nil? ? head(:not_found) : render(:text => compiled.to_s)
end
protected
@@ -20,6 +20,6 @@
def can_render_path?(path)
!path.include?("..")
end
-end
\ No newline at end of file
+end