Skip to content

Commit e6bfb86

Browse files
committed
Add Welcome Controller
1 parent 8d4d1b8 commit e6bfb86

17 files changed

+209
-1
lines changed

Diff for: .DS_Store

6 KB
Binary file not shown.

Diff for: blog/.DS_Store

6 KB
Binary file not shown.

Diff for: blog/Gemfile.lock

+119
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
actionmailer (4.0.0)
5+
actionpack (= 4.0.0)
6+
mail (~> 2.5.3)
7+
actionpack (4.0.0)
8+
activesupport (= 4.0.0)
9+
builder (~> 3.1.0)
10+
erubis (~> 2.7.0)
11+
rack (~> 1.5.2)
12+
rack-test (~> 0.6.2)
13+
activemodel (4.0.0)
14+
activesupport (= 4.0.0)
15+
builder (~> 3.1.0)
16+
activerecord (4.0.0)
17+
activemodel (= 4.0.0)
18+
activerecord-deprecated_finders (~> 1.0.2)
19+
activesupport (= 4.0.0)
20+
arel (~> 4.0.0)
21+
activerecord-deprecated_finders (1.0.3)
22+
activesupport (4.0.0)
23+
i18n (~> 0.6, >= 0.6.4)
24+
minitest (~> 4.2)
25+
multi_json (~> 1.3)
26+
thread_safe (~> 0.1)
27+
tzinfo (~> 0.3.37)
28+
arel (4.0.0)
29+
atomic (1.1.13)
30+
builder (3.1.4)
31+
coffee-rails (4.0.0)
32+
coffee-script (>= 2.2.0)
33+
railties (>= 4.0.0.beta, < 5.0)
34+
coffee-script (2.2.0)
35+
coffee-script-source
36+
execjs
37+
coffee-script-source (1.6.3)
38+
erubis (2.7.0)
39+
execjs (2.0.0)
40+
hike (1.2.3)
41+
i18n (0.6.5)
42+
jbuilder (1.5.0)
43+
activesupport (>= 3.0.0)
44+
multi_json (>= 1.2.0)
45+
jquery-rails (3.0.4)
46+
railties (>= 3.0, < 5.0)
47+
thor (>= 0.14, < 2.0)
48+
json (1.8.0)
49+
mail (2.5.4)
50+
mime-types (~> 1.16)
51+
treetop (~> 1.4.8)
52+
mime-types (1.24)
53+
minitest (4.7.5)
54+
multi_json (1.7.9)
55+
polyglot (0.3.3)
56+
rack (1.5.2)
57+
rack-test (0.6.2)
58+
rack (>= 1.0)
59+
rails (4.0.0)
60+
actionmailer (= 4.0.0)
61+
actionpack (= 4.0.0)
62+
activerecord (= 4.0.0)
63+
activesupport (= 4.0.0)
64+
bundler (>= 1.3.0, < 2.0)
65+
railties (= 4.0.0)
66+
sprockets-rails (~> 2.0.0)
67+
railties (4.0.0)
68+
actionpack (= 4.0.0)
69+
activesupport (= 4.0.0)
70+
rake (>= 0.8.7)
71+
thor (>= 0.18.1, < 2.0)
72+
rake (10.1.0)
73+
rdoc (3.12.2)
74+
json (~> 1.4)
75+
sass (3.2.10)
76+
sass-rails (4.0.0)
77+
railties (>= 4.0.0.beta, < 5.0)
78+
sass (>= 3.1.10)
79+
sprockets-rails (~> 2.0.0)
80+
sdoc (0.3.20)
81+
json (>= 1.1.3)
82+
rdoc (~> 3.10)
83+
sprockets (2.10.0)
84+
hike (~> 1.2)
85+
multi_json (~> 1.0)
86+
rack (~> 1.0)
87+
tilt (~> 1.1, != 1.3.0)
88+
sprockets-rails (2.0.0)
89+
actionpack (>= 3.0)
90+
activesupport (>= 3.0)
91+
sprockets (~> 2.8)
92+
sqlite3 (1.3.8)
93+
thor (0.18.1)
94+
thread_safe (0.1.2)
95+
atomic
96+
tilt (1.4.1)
97+
treetop (1.4.15)
98+
polyglot
99+
polyglot (>= 0.3.1)
100+
turbolinks (1.3.0)
101+
coffee-rails
102+
tzinfo (0.3.37)
103+
uglifier (2.1.2)
104+
execjs (>= 0.3.0)
105+
multi_json (~> 1.0, >= 1.0.2)
106+
107+
PLATFORMS
108+
ruby
109+
110+
DEPENDENCIES
111+
coffee-rails (~> 4.0.0)
112+
jbuilder (~> 1.2)
113+
jquery-rails
114+
rails (= 4.0.0)
115+
sass-rails (~> 4.0.0)
116+
sdoc
117+
sqlite3
118+
turbolinks
119+
uglifier (>= 1.3.0)

Diff for: blog/app/.DS_Store

6 KB
Binary file not shown.

Diff for: blog/app/assets/javascripts/welcome.js.coffee

+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/

Diff for: blog/app/assets/stylesheets/welcome.css.scss

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

Diff for: blog/app/controllers/welcome_controller.rb

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

Diff for: blog/app/controllers/welcome_controller.rb~

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

Diff for: blog/app/helpers/welcome_helper.rb

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

Diff for: blog/app/views/.DS_Store

6 KB
Binary file not shown.

Diff for: blog/app/views/welcome/.DS_Store

6 KB
Binary file not shown.

Diff for: blog/app/views/welcome/index.html.erb

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<h1>Hello, Rails!</h1>

Diff for: blog/app/views/welcome/index.html.erb~

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<h1>Welcome#index</h1>

Diff for: blog/config/routes.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
Blog::Application.routes.draw do
2+
get "welcome/index"
23
# The priority is based upon order of creation: first created -> highest priority.
34
# See how all your routes lay out with "rake routes".
45

56
# You can have the root of your site routed with "root"
6-
# root 'welcome#index'
7+
root to: "welcome#index"
78

89
# Example of regular route:
910
# get 'products/:id' => 'catalog#view'

Diff for: blog/config/routes.rb~

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
Blog::Application.routes.draw do
2+
get "welcome/index"
3+
# The priority is based upon order of creation: first created -> highest priority.
4+
# See how all your routes lay out with "rake routes".
5+
6+
# You can have the root of your site routed with "root"
7+
# root 'welcome#index'
8+
9+
# Example of regular route:
10+
# get 'products/:id' => 'catalog#view'
11+
12+
# Example of named route that can be invoked with purchase_url(id: product.id)
13+
# get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
14+
15+
# Example resource route (maps HTTP verbs to controller actions automatically):
16+
# resources :products
17+
18+
# Example resource route with options:
19+
# resources :products do
20+
# member do
21+
# get 'short'
22+
# post 'toggle'
23+
# end
24+
#
25+
# collection do
26+
# get 'sold'
27+
# end
28+
# end
29+
30+
# Example resource route with sub-resources:
31+
# resources :products do
32+
# resources :comments, :sales
33+
# resource :seller
34+
# end
35+
36+
# Example resource route with more complex sub-resources:
37+
# resources :products do
38+
# resources :comments
39+
# resources :sales do
40+
# get 'recent', on: :collection
41+
# end
42+
# end
43+
44+
# Example resource route with concerns:
45+
# concern :toggleable do
46+
# post 'toggle'
47+
# end
48+
# resources :posts, concerns: :toggleable
49+
# resources :photos, concerns: :toggleable
50+
51+
# Example resource route within a namespace:
52+
# namespace :admin do
53+
# # Directs /admin/products/* to Admin::ProductsController
54+
# # (app/controllers/admin/products_controller.rb)
55+
# resources :products
56+
# end
57+
end

Diff for: blog/test/controllers/welcome_controller_test.rb

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
require 'test_helper'
2+
3+
class WelcomeControllerTest < ActionController::TestCase
4+
test "should get index" do
5+
get :index
6+
assert_response :success
7+
end
8+
9+
end

Diff for: blog/test/helpers/welcome_helper_test.rb

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
require 'test_helper'
2+
3+
class WelcomeHelperTest < ActionView::TestCase
4+
end

0 commit comments

Comments
 (0)