NameError when using act_as_ferret
        Posted  
        
            by manish nautiyal
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by manish nautiyal
        
        
        
        Published on 2010-05-15T13:52:50Z
        Indexed on 
            2010/05/15
            13:54 UTC
        
        
        Read the original article
        Hit count: 298
        
ruby-on-rails
|ruby
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
end
My controller
class PartController < ApplicationController
def index
@proscribeds = Competitor.paginate(:all, :order => sort , :page => params[:page], :per_page => 70 )
end
end
Its working fine in localhost but when I deploy it in the server than I get this error.
act_as_ferret is working good with other models. I don't know why this is not working with only Competitor model.
© Stack Overflow or respective owner