Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds About Me Page #22

Merged
merged 6 commits into from
Apr 27, 2020
Merged

Adds About Me Page #22

merged 6 commits into from
Apr 27, 2020

Conversation

cato-hga
Copy link
Owner

I created the StaticPages controller for the home, about, and contact pages

  1. I included some controller tests
  2. Added some styling for the about me and homepage pages

@@ -0,0 +1,2 @@
module StaticPagesHelper

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this file necessary? Don't check in files that aren't used.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not. I'll remove it.

config/routes.rb Outdated
@@ -1,4 +1,7 @@
Rails.application.routes.draw do
get 'static_pages/home'
get 'static_pages/about'
get 'static_pages/contact'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These 3 lines should be combined into one namespace. Something like:

namespace :static_pages do
  get '/home'
  get '/about'
  get '/contact'
end

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -0,0 +1,15 @@
require 'rails_helper'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same with this file. It's autogenerated and not needed.

@@ -0,0 +1,26 @@
require 'rails_helper'

RSpec.describe StaticPagesController, type: :controller do

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider moving to request specs instead of controller specs. Controller specs have been deprecated and request specs load the application in a proper way to check to make sure the controller actions are working correctly.

rspec/rspec-rails#1838

@notmarkmiranda
Copy link

Can you post screenshots of what your pages look like that you're styling?

Also, this should have been split into 2 PRs. styling should be separate from controller actions.

@cato-hga
Copy link
Owner Author

Here is the About Me page:

Screen Shot 2020-04-21 at 11 34 06 AM

@cato-hga
Copy link
Owner Author

Here is the Homepage:
Screen Shot 2020-04-21 at 12 04 36 PM

@cato-hga cato-hga merged commit 019087b into master Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants