Commit 86dbf669 by nnnghia98

edit top page

parent c993fe46
// Place all the styles related to the StaticPages controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
class StaticPagesController < ApplicationController
def top_page
end
def favorite
end
def history
end
end
module StaticPagesHelper
end
<footer class="footer">
</footer>
<header class="navbar navbar-fixed-top navbar-inverse">
<div class="container">
<%= link_to image_tag("venjob_logo.png", alt: "VeNJOB Logo") , root_path %>
</div>
</header>
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track": "reload" %>
<%= javascript_pack_tag "application", "data-turbolinks-track": "reload" %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>Venjob</title> <title><%= yield(:title) %> | VeNJOB</title>
<%= csrf_meta_tags %> <%= render "layouts/rails_default" %>
<%= csp_meta_tag %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
</head> </head>
<body> <body>
<%= render "layouts/header" %>
<%= yield %> <%= yield %>
</body> </body>
</html> </html>
<% provide(:title, "Favorite") %>
<h1>VeNJOB Favorite</h1>
<% provide(:title, "History") %>
<h1>VeNJOB History</h1>
<% provide(:title, "Top Page") %>
<h1>VeNJOB Top page</h1>
Rails.application.routes.draw do Rails.application.routes.draw do
devise_for :users devise_for :users
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
root "static_pages#top_page"
get "static_pages/top_page"
get "static_pages/favorite"
get "static_pages/history"
end end
require 'test_helper'
class StaticPagesControllerTest < ActionDispatch::IntegrationTest
def setup
@base_title = "VeNJOB"
end
test "should get top_page" do
get static_pages_top_page_url
assert_response :success
assert_select "title", "Top Page | #{@base_title}"
end
test "should get favorite" do
get static_pages_favorite_url
assert_response :success
assert_select "title", "Favorite | #{@base_title}"
end
test "should get history" do
get static_pages_history_url
assert_response :success
assert_select "title", "History | #{@base_title}"
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