Home>

I have implemented the detailed display function of the flea market app and want to move to the detailed page, but as shown in the image below
No route matches {: action =>"show",: controller =>"items"}, missing required keys: [: id]
Cannot be.
Can you tell me how to move to the details page?

items_controller.rb
class ItemsController</pre>
<pre><code>items/index.rb<% = render "shared/header"%><% # "Life-changing flea market apps" band at the top of the screen%>          Life-changing flea market apps
      <p class ='service-explain'>    Anyone can easily list and purchase FURIMA
  </p><p class ='service-explain'>    It's a flea market app
  </p>      <% = link_to image_tag ("https://linkmaker.itunes.apple.com/ja-jp/badge-lrg.svg?releaseDate=2011-09-21&kind=iossoftware&bubble=ios_apps", class: "apple-btn") , "#"%>  <% = link_to image_tag ("dl-android.png", class: "google-btn"), "#"%>    <% #/"Life-changing flea market apps" band at the top of the screen%><% # 3 reasons why FURIMA is chosen%>          3 Reasons to Choose FURIMA
      <ul class ='reason-lists'>  <li class ='list'>    <% = image_tag "furima-intro01.png", class: "list-pict"%>    <span class ='reason-list-number'>1</span>              <span class ='reason-list-blue-text'>3 minutes</span>        Sell ​​immediately
              <p class ='reason-list-description'>        You can easily list items just by entering them on your smartphone!
      </p>  </li>  <li class ='list'>    <% = image_tag "furima-intro02.png", class: "list-pict"%>    <span class ='reason-list-number'>2</span>      <span class ='reason-list-blue-text'>Simple</span>        Easy to use
              <p class ='reason-list-description'>        No need for troublesome input, smooth search and purchase!
      </p>  </li>  <li class ='list'>    <% = image_tag "furima-intro03.png", class: "list-pict"%>    <span class ='reason-list-number'>3</span>                Fee
        <span class ='reason-list-blue-text'>Cheapest in the industry</span>            <p class ='reason-list-description'>        Sell ​​and buy at a discount of 10%!
      </p>  </li></ul><% #/3 reasons why FURIMA is chosen%><% # "No. 1 in Japan" band in the center of the screen%>          No. 1 in Japan
      <p class ='ad-explain'>    FURIMA is the most popular flea market app.
  </p><p class ='ad-explain'>    The number of listings and purchases is also the highest in the industry!
  </p><p class ='ad-explain'>    You may be able to find the product I wanted.
  </p>      <% = link_to image_tag ("https://linkmaker.itunes.apple.com/ja-jp/badge-lrg.svg?releaseDate=2011-09-21&kind=iossoftware&bubble=ios_apps", class: "apple-btn") , "#"%>  <% = link_to image_tag ("dl-android.png", class: "google-btn"), "#"%>    <% #/"No. 1 in Japan" band in the center of the screen%><% # FURIMA features%>          Features of FURIMA
      <ul class ='feature-lists'>  <li class ='list'>    <% = image_tag "furima-intro04.png", class: "list-pict"%>                Easy to buy and sell
              <p class ='feature-list-description'>        You can easily list and purchase anytime, anywhere with just one smartphone!
      </p>  </li>  <li class ='list'>    <% = image_tag "furima-intro05.png", class: "list-pict"%>                Sales proceeds can be transferred on the same day
              <p class ='feature-list-description'>        If i request a transfer by 9 am, the money will be credited to the designated account the next day.
      </p>  </li>  <li class ='list'>    <% = image_tag "furima-intro06.png", class: "list-pict"%>                Supports various payments
              <p class ='feature-list-description'>        There are various payment methods such as points and sales, as well as credit cards.
      </p>  </li></ul><% #/FURIMA features%><% # Product list%>     Pickup category   <% = link_to'Newly posted product', new_item_path, class: "subtitle"%><ul class ='item-lists'>  <% @ item.each do | item |%>  <li class ='list'>    <% = link_to item, item_path [item.id] do%>              <% = image_tag item.image, class: "item-img"%>      <% # Show sold out if the item is sold%>                  <span>Sold Out !!</span>                <% # // Show sold out if the item is sold%>                                  <% = item.name%>                            <span><% = item.price%>Yen</span>                      <% = image_tag "star.png", class: "star-icon"%>          <span class ='star-count'>0</span>                                  <% end%>    <% end%>  </li>
    <% # Dummy% when there is no product>  <% if @ item.length == 0%>  <li class ='list'>    <% = link_to'#' do%>    <% = image_tag "https://s3-ap-northeast-1.amazonaws.com/mercarimaster/uploads/captured_image/content/10/a004.png", class: "item-img"%>                            Sell ​​the item!
                              <span>99999999 yen<br>(tax included)</span>                      <% = image_tag "star.png", class: "star-icon"%>          <span class ='star-count'>0</span>                                  <% end%>  </li>  <% end%>  <% #/Dummy% when there is no product></ul><% #/Product list%><% = link_to (new_item_path, class:'purchase-btn') do%><span class ='purchase-btn-text'>Sell</span><% = image_tag'icon_camera.png', size: '185x50', class: "purchase-btn-icon"%><% end%><% = render "shared/footer"%>
routes.rb
Rails.application.routes.draw do
  devise_for: users
  root to: "items # index"
  resources: items, only: [: new,: create,: index,: show]
end

What I tried
In the show action
@item = Item.find (params [: id])
Changed to @item = Item.find (params [: id]). includes (: user).