Class: Teaspoon::Bundle::BundleController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- Teaspoon::Bundle::BundleController
- Defined in:
- app/controllers/teaspoon/bundle/bundle_controller.rb
Instance Method Summary collapse
Instance Method Details
#serve ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'app/controllers/teaspoon/bundle/bundle_controller.rb', line 3 def serve file = File.join(Teaspoon::Bundle.dir, "teaspoon_bundle_#{params[:suite]}.js.erb") File.write(file, contents) begin asset = Rails.application.assets.find_asset(file) render js: asset.to_s ensure File.delete(file) end end |