Class: EmberCLI::Routes::EmberController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- EmberCLI::Routes::EmberController
- Defined in:
- lib/ember-cli/routes/ember_controller.rb
Instance Method Summary collapse
- #handle ⇒ Object
-
#handle_asset ⇒ Object
in development/test only.
Instance Method Details
#handle ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/ember-cli/routes/ember_controller.rb', line 7 def handle if Rails.env.production? deploy = EmberCLI::Deploy::Redis.new(namespace: "frontend") render html: deploy.html.html_safe, layout: false else render file: "#{params[:dist_path]}/index.html", layout: false end end |
#handle_asset ⇒ Object
in development/test only
17 18 19 20 |
# File 'lib/ember-cli/routes/ember_controller.rb', line 17 def handle_asset filename = "#{params[:filename]}.#{params[:format]}" render file: "#{params[:dist_path]}/assets/#{filename}", layout: false end |