Add words controller with index and show actions
This commit is contained in:
3
app/views/words/index.html.erb
Normal file
3
app/views/words/index.html.erb
Normal file
@@ -0,0 +1,3 @@
|
||||
<% @words.each do |word| %>
|
||||
<p><%= link_to word.word, word %></p>
|
||||
<% end %>
|
||||
3
app/views/words/show.html.erb
Normal file
3
app/views/words/show.html.erb
Normal file
@@ -0,0 +1,3 @@
|
||||
<h1><%= @word.word %></h1>
|
||||
|
||||
<%= render "application/definitions", word: @word %>
|
||||
Reference in New Issue
Block a user