我是 Ransack 的新手。试图遵循这个RailsCast并安装 Ransack 的Rails 4 兼容分支。点击表单的提交按钮后,我收到此错误:
# @search = Resource.search(params[:q])
Don't know how to klassify #<ActiveRecord::Associations::JoinDependency::JoinBase:0x007ffdf67a3360>
这是代码的其余部分:
# controller
def index
@search = Resource.search(params[:q])
@resources = @search.result(:distinct => true)
end
# view (HAML)
= search_form_for @search do |f|
= f.label :title_eq, "Title"
= f.text_field :title_eq
= f.submit "Search"
# Gemfile
gem "ransack", :git => "https://github.com/jonatack/ransack"
# Gemfile.lock
polyamorous (0.6.2)
activerecord (>= 3.0)
什么地方出了错?