1
0
Fork 0

Add action HomeController#show

master
Alex Kotov 2 years ago
parent d6e1140e33
commit 084f3e9b0d
  1. 4
      app/controllers/home_controller.rb
  2. 1
      app/views/home/show.html.erb
  3. 2
      app/views/layouts/application.html.erb
  4. 3
      config/routes.rb
  5. 8
      test/controllers/home_controller_test.rb

@ -0,0 +1,4 @@
class HomeController < ApplicationController
def show
end
end

@ -0,0 +1 @@
<h1>Decentralized Microblog</h1>

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>LessonDecentralizedMicroblogInRuby</title>
<title>Decentralized Microblog</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<%= csrf_meta_tags %>
<%= csp_meta_tag %>

@ -1,3 +1,4 @@
Rails.application.routes.draw do
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
get 'home/show'
root to: 'home#show'
end

@ -0,0 +1,8 @@
require "test_helper"
class HomeControllerTest < ActionDispatch::IntegrationTest
test "should get show" do
get home_show_url
assert_response :success
end
end