aboutsummaryrefslogtreecommitdiffstats
path: root/guides/code/getting_started/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'guides/code/getting_started/app/controllers')
-rw-r--r--guides/code/getting_started/app/controllers/home_controller.rb2
-rw-r--r--guides/code/getting_started/app/controllers/posts_controller.rb3
2 files changed, 4 insertions, 1 deletions
diff --git a/guides/code/getting_started/app/controllers/home_controller.rb b/guides/code/getting_started/app/controllers/home_controller.rb
index 6cc31c1ca3..309b70441e 100644
--- a/guides/code/getting_started/app/controllers/home_controller.rb
+++ b/guides/code/getting_started/app/controllers/home_controller.rb
@@ -1,4 +1,4 @@
-class HomeController < ApplicationController
+class WelcomeController < ApplicationController
def index
end
diff --git a/guides/code/getting_started/app/controllers/posts_controller.rb b/guides/code/getting_started/app/controllers/posts_controller.rb
index f9181f98c6..e4d83dd279 100644
--- a/guides/code/getting_started/app/controllers/posts_controller.rb
+++ b/guides/code/getting_started/app/controllers/posts_controller.rb
@@ -1,5 +1,8 @@
class PostsController < ApplicationController
+ def index
+ @posts = Post.all
+ end
def show
@post = Post.find(params[:id])