lib/plezi/router/assets.rb in plezi-0.14.7 vs lib/plezi/router/assets.rb in plezi-0.14.8
- old
+ new
@@ -17,15 +17,16 @@
end
else
def index
name = File.join(Plezi.assets, *params['*'.freeze]).freeze
data = ::Plezi::AssetBaker.bake(name)
- IO.binwrite(name, data) if data.is_a?(String)
- if File.exist? name
- response['X-Sendfile'.freeze] = name
- response.body = File.open(name)
- return true
- end
+ return data if data.is_a?(String)
+ # IO.binwrite(name, data) if data.is_a?(String)
+ # if File.exist? name
+ # response['X-Sendfile'.freeze] = name
+ # response.body = File.open(name)
+ # return true
+ # end
false
end
end
def show