Rails render status: :not found missing template error

Viewed 5042

While developing an app for a course,I hit upon a stumbling block:

The error screen

And here is my Stocks Controller error, where the error appears:

class StocksController < ApplicationController
  def search
    if params[:stock]
      @stock = Stock.find_by_ticker(params[:stock])
      @stock ||= Stock.new_from_lookup(params[:stock])
    end

    if @stock
      render json: @stock
      #render partial: 'lookup'

    else
      render status: :not_found ,nothing: true
    end

  end

end

On the course, they have the same code as I do,but for them, it works.The only difference I am aware of is that they are working on Rails 4(Nitrous),and that I am working on Rails 5(Mac OS X/Atom IDE/GitLab repository).Please help me if you can!Thank you in advance!

2 Answers
Related