Class: Jets::WelcomeController

Inherits:
Controller::Base show all
Defined in:
lib/jets/internal/app/controllers/jets/welcome_controller.rb

Instance Attribute Summary

Attributes inherited from Controller::Base

#request

Attributes inherited from Lambda::Functions

#context, #event, #meth

Instance Method Summary collapse

Methods inherited from Controller::Base

#initialize, internal, process

Methods included from Controller::Params

#params

Methods included from Controller::Rendering

#actual_host, #add_stage_name, #adjust_content_type!, #default_layout, #default_options, #ensure_render, #normalize_options, #render, #url_for

Methods included from Controller::Redirection

#ensure_protocol, #redirect_to

Methods inherited from Lambda::Functions

#initialize

Methods included from Lambda::Dsl

#lambda_functions

Constructor Details

This class inherits a constructor from Jets::Controller::Base

Instance Method Details

#indexObject

TODO: When ruby support is relesed, switch to it only.



13
14
15
16
17
18
19
20
# File 'lib/jets/internal/app/controllers/jets/welcome_controller.rb', line 13

def index
  homepage = "#{Jets.root}public/index.html"
  if File.exist?(homepage)
    render file: homepage
  else
    render plain: "The public/index.html file does not exist but the root route in config/routes.rb routes to this file.  You probably want to update the root route."
  end
end