Commit 81767f8c authored by kolosfed's avatar kolosfed

Create MainController with start page action

parent e5876a82
...@@ -12,4 +12,4 @@ ...@@ -12,4 +12,4 @@
// //
//= require rails-ujs //= require rails-ujs
//= require turbolinks //= require turbolinks
//= require_tree . //= require_tree ./application
// Action Cable provides the framework to deal with WebSockets in Rails.
// You can generate new channels where WebSocket features live using the `rails generate channel` command.
//
//= require action_cable
//= require_self
//= require_tree ./channels
(function() {
this.App || (this.App = {});
App.cable = ActionCable.createConsumer();
}).call(this);
...@@ -10,6 +10,6 @@ ...@@ -10,6 +10,6 @@
* files in this directory. Styles in this file should be added after the last require_* statement. * files in this directory. Styles in this file should be added after the last require_* statement.
* It is generally better to create a new file per style scope. * It is generally better to create a new file per style scope.
* *
*= require_tree . *= require_tree ./application
*= require_self *= require_self
*/ */
class MainController < ApplicationController
def start_page
end
end
%h1 Main#start_page
%p Find me in app/views/main/start_page.html.haml
Rails.application.routes.draw do Rails.application.routes.draw do
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
root 'main#start_page'
end end
require 'test_helper'
class MainControllerTest < ActionDispatch::IntegrationTest
test "should get start_page by root path" do
get root_url
assert_response :success
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment