From 8f01c1db2a0fb9902015cbe310e4fb31efc06e04 Mon Sep 17 00:00:00 2001 From: Toru Takahashi Date: Wed, 2 May 2018 00:42:01 +0900 Subject: [PATCH] [phase-1]index view --- app/controllers/glossary_terms_controller.rb | 1 + app/views/glossary_terms/index.html.erb | 21 ++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/app/controllers/glossary_terms_controller.rb b/app/controllers/glossary_terms_controller.rb index 8bd0e1c..88681b3 100644 --- a/app/controllers/glossary_terms_controller.rb +++ b/app/controllers/glossary_terms_controller.rb @@ -1,5 +1,6 @@ class GlossaryTermsController < ApplicationController def index + @glossary_terms = GlossaryTerm.all end end diff --git a/app/views/glossary_terms/index.html.erb b/app/views/glossary_terms/index.html.erb index 9b67204..762e6f0 100644 --- a/app/views/glossary_terms/index.html.erb +++ b/app/views/glossary_terms/index.html.erb @@ -1 +1,22 @@

GlossaryTermsController#index

+ + + + + + + + + + <% @glossary_terms.each do |term| %> + + + + + <% end %> + +
namedescription
+ <%= term.name %> + + <%= term.description %> +