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

ISSUE #1 :: added a friendlier 404 page #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/controllers/home_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def url
redirect_to @link.url
end
else
redirect_to "https://suncoast.io"
redirect_to '/not_found'
end
end
end
11 changes: 11 additions & 0 deletions app/views/errors/not_found.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
section.section style="background-image: linear-gradient(rgba(133,87,126,.75),rgba(128,206,210,.75))"
div.has-text-centered style="font-size: 1.5rem"
p Sorry about that, but we can't find the page you were looking for.
p style="padding-top: 0.5rem"
'Click on the Suncoast Developers Guild Icon to go back home.
a href="/"
= image_tag "icon.svg", size: '50x50'
div.has-text-centered style="padding-top: 1.5rem"
a href="https://suncoast.io"
= image_tag "banner.svg", size: '200x80'
p The Academy at Suncoast Developers Guild is an immersive code school. What that means is, in about three months (with the guidance and support of seasoned industry experts) you will gain the skills needed to become a junior developer. Over the course of the curriculum, you will learn the basics of web development and also how to be job-ready for the modern market. This immersive style of education is often called a "bootcamp" because of the fast pace of learning and the full-time commitment.
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
get "sign_in", to: redirect("/auth/#{Rails.env.production? ? :google_oauth2 : :developer}")
get "sign_out", to: "sessions#destroy"
get "auth/failure", to: redirect("/")
get "not_found", to: "errors#not_found"
match "auth/:provider/callback", to: "sessions#create", via: %i[get post]
match "/:slug", to: "home#url", via: %i[get post], as: "short"
root to: "home#index"
Expand Down