title: undefined method `ransack' for #<Product::ActiveRecord_Relation...>
body: <p>Now I am making job reviewing site. And I would like to create search function on my landing page. So I installed gemfile "ransack". However, when I put "ransack" on my controller, the error "undefined method `ransack' for #" occurred in local environment.</p>
  
  <p>Although I restarted local server and command "gem list ransack" shows that ransack was successfully installed, I couldn't ransack.... What is the cause of problem might be? Thanks for reading.</p>
  
  <p>My controller is like this </p>
  
  <p>Product_controller.rb</p>
  
  <pre><code>class ProductsController &lt; RankingController
    layout "review_site", :except =&gt; :show
    # before_action :authenticate_user!, only: :show
    def index
      @products = Product.order('id ASC').per_page_kaminari(params[:page]).per(10)
    end
  
    def show
      @product = Product.find(params[:id])
    end
  
    def search
      @products = Product.where('title LIKE(?)', "%#{params[:keyword]}%").per_page_kaminari(params[:page]).per(10)
    end
  
    def landing
      @q = Product.order('id ASC').per_page_kaminari(params[:page]).per(10).ransack(search_params)
      @products = @q.result(distinct: true)
    end
  end
  
  private
  def search_params
    params.permit(:title_count)
  end
  </code></pre>