Class: Jets::WelcomeController
- Inherits:
-
Controller::Base
- Object
- Lambda::Functions
- Controller::Base
- Jets::WelcomeController
- Defined in:
- lib/jets/internal/app/controllers/jets/welcome_controller.rb
Instance Attribute Summary
Attributes inherited from Controller::Base
Attributes inherited from Lambda::Functions
Instance Method Summary collapse
-
#index ⇒ Object
TODO: When ruby support is relesed, switch to it only.
Methods inherited from Controller::Base
#initialize, internal, process
Methods included from Controller::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
Methods included from Lambda::Dsl
Constructor Details
This class inherits a constructor from Jets::Controller::Base
Instance Method Details
#index ⇒ Object
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 |