Forum: Ferret NameError when using acts_as_ferret in model

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
30ce8f12966e0ca2ffc6916dfbf3dc71?d=identicon&s=25 Manish N. (manish812)
on 2010-05-15 15:41
Hi all

I am getting this error when I am using

acts_as_ferret :fields =>[:competitor], :remote => true

NameError in PartController#index

uninitialized constant PartController::Competitor

My Model

class Competitor < ActiveRecord::Base

  validates_presence_of :fee_earner_id, :notes

  belongs_to :fee_earner
  belongs_to :country
  belongs_to :state
  belongs_to :user

acts_as_ferret :fields =>[:competitor], :remote => true


My controller

class PartController < ApplicationController

 @@total_company = 70

def index

 @proscribeds = Competitor.paginate(:all, :order => sort , :page =>
params[:page], :per_page => @@total_company )


This topic is locked and can not be replied to.