app/controllers/engine_assets/assets_controller.rb in engine-assets-0.1.0 vs app/controllers/engine_assets/assets_controller.rb in engine-assets-0.2.0
- old
+ new
@@ -3,9 +3,18 @@
layout nil
before_filter :expire, :set_headers
after_filter :cache
+ def show
+ flat_file = EngineAssets::PublicLocator.locate(File.join(controller_name, [params[:path], params[:format]].join('.')))
+ if(flat_file)
+ render(:file => flat_file)
+ else
+ render(:template => File.join('engine_assets', controller_name, params[:path]), :layout => false)
+ end
+ end
+
private
def expire
# TODO