Skip to content

Commit 809cee1

Browse files
committed
add basic pages controller
1 parent daf2007 commit 809cee1

File tree

7 files changed

+17
-53
lines changed

7 files changed

+17
-53
lines changed
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Place all the behaviors and hooks related to the matching controller here.
2+
# All this logic will automatically be available in application.js.
3+
# You can use CoffeeScript in this file: http://coffeescript.org/

app/assets/stylesheets/pages.css.scss

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Place all the styles related to the pages controller here.
2+
// They will automatically be included in application.css.
3+
// You can use Sass (SCSS) here: http://sass-lang.com/

app/controllers/pages_controller.rb

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
class PagesController < ApplicationController
2+
def home
3+
end
4+
end

app/helpers/pages_helper.rb

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
module PagesHelper
2+
end

app/views/layouts/application.html.erb

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
66
<%= javascript_include_tag "application", "data-turbolinks-track" => true %>
77
<%= csrf_meta_tags %>
8+
<script type="text/javascript" src="//use.typekit.net/ita6tqm.js"></script>
9+
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
810
</head>
911
<body>
1012

app/views/pages/home.html.erb

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<h1>Pages#home</h1>
2+
<p>Find me in app/views/pages/home.html.erb</p>

config/routes.rb

+1-53
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,4 @@
11
Kids::Application.routes.draw do
2-
# The priority is based upon order of creation: first created -> highest priority.
3-
# See how all your routes lay out with "rake routes".
42

5-
# You can have the root of your site routed with "root"
6-
# root 'welcome#index'
7-
8-
# Example of regular route:
9-
# get 'products/:id' => 'catalog#view'
10-
11-
# Example of named route that can be invoked with purchase_url(id: product.id)
12-
# get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
13-
14-
# Example resource route (maps HTTP verbs to controller actions automatically):
15-
# resources :products
16-
17-
# Example resource route with options:
18-
# resources :products do
19-
# member do
20-
# get 'short'
21-
# post 'toggle'
22-
# end
23-
#
24-
# collection do
25-
# get 'sold'
26-
# end
27-
# end
28-
29-
# Example resource route with sub-resources:
30-
# resources :products do
31-
# resources :comments, :sales
32-
# resource :seller
33-
# end
34-
35-
# Example resource route with more complex sub-resources:
36-
# resources :products do
37-
# resources :comments
38-
# resources :sales do
39-
# get 'recent', on: :collection
40-
# end
41-
# end
42-
43-
# Example resource route with concerns:
44-
# concern :toggleable do
45-
# post 'toggle'
46-
# end
47-
# resources :posts, concerns: :toggleable
48-
# resources :photos, concerns: :toggleable
49-
50-
# Example resource route within a namespace:
51-
# namespace :admin do
52-
# # Directs /admin/products/* to Admin::ProductsController
53-
# # (app/controllers/admin/products_controller.rb)
54-
# resources :products
55-
# end
3+
root 'pages#home'
564
end

0 commit comments

Comments
 (0)