diff --git a/.gitignore b/.gitignore index f22dd34..5afa94c 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,5 @@ /yarn-error.log yarn-debug.log* .yarn-integrity + +.idea \ No newline at end of file diff --git a/app/assets/stylesheets/static_pages.scss b/app/assets/stylesheets/static_pages.scss new file mode 100644 index 0000000..5012696 --- /dev/null +++ b/app/assets/stylesheets/static_pages.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the static_pages controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: https://sass-lang.com/ diff --git a/app/controllers/static_pages_controller.rb b/app/controllers/static_pages_controller.rb new file mode 100644 index 0000000..689bc22 --- /dev/null +++ b/app/controllers/static_pages_controller.rb @@ -0,0 +1,7 @@ +class StaticPagesController < ApplicationController + def landing_page + end + + def privacy_policy + end +end diff --git a/app/helpers/static_pages_helper.rb b/app/helpers/static_pages_helper.rb new file mode 100644 index 0000000..2d63e79 --- /dev/null +++ b/app/helpers/static_pages_helper.rb @@ -0,0 +1,2 @@ +module StaticPagesHelper +end diff --git a/app/views/static_pages/landing_page.html.erb b/app/views/static_pages/landing_page.html.erb new file mode 100644 index 0000000..7a35302 --- /dev/null +++ b/app/views/static_pages/landing_page.html.erb @@ -0,0 +1,2 @@ +

Landing Page

+<%=link_to "Privacy Policy", privacy_policy_path %> diff --git a/app/views/static_pages/privacy_policy.html.erb b/app/views/static_pages/privacy_policy.html.erb new file mode 100644 index 0000000..991262d --- /dev/null +++ b/app/views/static_pages/privacy_policy.html.erb @@ -0,0 +1,2 @@ +

Privacy Policy

+<%=link_to "Home", root_path %> diff --git a/config/routes.rb b/config/routes.rb index c06383a..57c6a8d 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,3 +1,6 @@ Rails.application.routes.draw do + root "static_pages#landing_page" + # get 'static_pages/privacy_policy' + get "privacy_policy", to: "static_pages#privacy_policy" # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html end diff --git a/test/controllers/static_pages_controller_test.rb b/test/controllers/static_pages_controller_test.rb new file mode 100644 index 0000000..72f8926 --- /dev/null +++ b/test/controllers/static_pages_controller_test.rb @@ -0,0 +1,13 @@ +require "test_helper" + +class StaticPagesControllerTest < ActionDispatch::IntegrationTest + test "should get landing_page" do + get static_pages_landing_page_url + assert_response :success + end + + test "should get privacy_policy" do + get static_pages_privacy_policy_url + assert_response :success + end +end