私のアクティブな管理者のバージョンは0.3.0ですが、それ以外は「Will_paginate」も使用しています。kaminariとwill_paginateの間で競合の構成設定を行いましたが、それでもこのエラーが発生します。他のモデルではすべてがうまく機能しているのに、どこで間違いを犯しているのかわかりません。助けが必要です。いくつかのリンクも検索しましたが、満足のいく答えが得られません。太字でエラーが発生します。
ActiveAdmin.register User do
menu :parent => 'Reports'
filter :id
filter :user_id
filter :updated_at
# and other filters
scope :all, :default => true do |user|
User.all
end
scope :active do |user|
User.where("user.status = ?", 'actvie')
end
scope :rejected do |user|
User.where("user.status = ?", 'non_active')
end
actions :index, :show
index do
column "ID" do |u|
link_to u.id, cs_user_path(u)
end
column "Status" do |u|
status_tag(u.status)
end
column "User" do |u|
link_to(u.user.full_name, cs_user_path(u.user)) rescue nil
end
end
collection_action :index, :method => :get do
scope = User.includes([:group,:address]).scoped
scope = scope.order params[:order].gsub(/_/,' ') if params[:order]
@collection = scope.paginate(:per_page => 25,:page => params[:page]) if params[:q].blank?
@search = scope.metasearch(clean_search_params(params[:q]))
**super do |format|**
format.html {
render "active_admin/resource/index"
}
end
end
end