title: No route matches {:action=>"show", :controller=>"statics"}, missing required keys: [:id]
body: <p>I am getting this error.</p>
  
  <p><a href="https://i.stack.imgur.com/7ZYz5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7ZYz5.png" alt="enter image description here"></a></p>
  
  <pre><code>&lt;%= link_to "New Product", 
  new_static_path %&gt;
  </code></pre>
  
  <h1>statics Controller</h1>
  
  <pre><code>class StaticsController &lt; ApplicationController
  def index
      @products = Product.all
  end
  
  def new
      @product = Product.new
  end
  
  def show
      product_value = Product.find(params[:id])
      @product_attribute = ProductAttribute.where(value: product_value.value)
  end
  
  def create
      @product = Product.new(product_params)
      if @product.save
          redirect_to root_url
      else
          render 'new'
      end
  end
  
  def edit
      @product = Product.find(params[:id])
  end
  
  def update
      @product = Product.find(params[:id])
      if @product.update(product_params)
          redirect_to root_url
      else
          render 'edit'
      end
  end
  
  def destroy
      Product.find(params[:id]).destroy
      flash[:success] = "Profile Updated"
      redirect_to root_url
  end
  
  private
  
      def product_params
          params.require(:product).permit(:name,:value)
      end 
  </code></pre>
  
  <p>end</p>
  
  <h1>Index.html.erb</h1>
  
  <pre><code>&lt;h1&gt;Listing the products in home page&lt;/h1&gt;
  
  &lt;% @products.each do |product| %&gt;
      &lt;li&gt;&lt;%=link_to product.name, static_path(product) %&gt;&lt;/li&gt;
      &lt;li&gt;&lt;%=link_to "Edit", edit_static_path(product) %&gt;&lt;/li&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <h1>ROUTES.RB</h1>
  
  <pre><code>root 'statics#index'
  resources :statics
  resources :products
  resources :productattributes 
  </code></pre>
  
  <h1>Rake routes</h1>
  
  <pre><code>               Prefix Verb   URI Pattern                           Controller#Action
                   root GET    /                                     statics#index
                statics GET    /statics(.:format)                    statics#index
                        POST   /statics(.:format)                    statics#create
             new_static GET    /statics/new(.:format)                statics#new
            edit_static GET    /statics/:id/edit(.:format)           statics#edit
                 static GET    /statics/:id(.:format)                statics#show
                        PATCH  /statics/:id(.:format)                statics#update
                        PUT    /statics/:id(.:format)                statics#update
                        DELETE /statics/:id(.:format)                statics#destroy
               products GET    /products(.:format)                   products#index
                        POST   /products(.:format)                   products#create
            new_product GET    /products/new(.:format)               products#new
           edit_product GET    /products/:id/edit(.:format)          products#edit
                product GET    /products/:id(.:format)               products#show
                        PATCH  /products/:id(.:format)               products#update
                        PUT    /products/:id(.:format)               products#update
                        DELETE /products/:id(.:format)               products#destroy
  
       productattributes GET /productattributes(.:format)   productattributes#index
  
  POST   /productattributes(.:format)     productattributes#create
  
  new_productattribute  GET    /productattributes/new(.:format)      productattributes#new
  
  edit_productattribute GET    /productattributes/:id/edit(.:format) productattributes#edit
  
  productattribute      GET    /productattributes/:id(.:format)      productattributes#show
  
   PATCH  /productattributes/:id(.:format)      productattributes#update
  
   PUT    /productattributes/:id(.:format)      productattributes#update
  
    DELETE /productattributes/:id(.:format)      productattributes#destroy
  </code></pre>
  
  <p>this is the rake routes for the project.</p>