Class: EmberCLI::Routes::EmberController

Inherits:
ApplicationController
  • Object
show all
Defined in:
lib/ember-cli/routes/ember_controller.rb

Instance Method Summary collapse

Instance Method Details

#handleObject



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_assetObject

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