Html ActiveRecord::语句在Exchangesnew中无效

Html ActiveRecord::语句在Exchangesnew中无效,html,ruby-on-rails,ruby,view,migrate,Html,Ruby On Rails,Ruby,View,Migrate,显示/home/dilek/Desktop/booky/app/views/exchanges/new.html.erb,其中第7行出现: PG::UndefinedColumn:错误:column books.status不存在 第1行:…..*来自books.user_id=$1和books.s :从books.user_id=$1和books.status=$2的图书中选择图书。* <div class="form-group m-3"> <

显示/home/dilek/Desktop/booky/app/views/exchanges/new.html.erb,其中第7行出现:

PG::UndefinedColumn:错误:column books.status不存在 第1行:…..*来自books.user_id=$1和books.s

:从books.user_id=$1和books.status=$2的图书中选择图书。*

 <div class="form-group m-3">
    <h4 class="mb-3">Please Select Book</h4>
    <%= form.select(:offer_book_id, @books.map{|book| [book.title, book.id]},{},{:class=>"form-control form-control-lg col-3"})%>
  </div>
  <button type="submit" class="btn btn-primary m-3 ml-5">Submit</button>
<% end %>

那么你的问题是什么?