i am using acts_as_solr plugin when i tried with search
by
def search
puts "#####################"
# ids = params[:name]
@id = params[:query]
@emp = Employee.find_by_solr(@id)
puts "------------------------------#{@emp}"
respond_to do |format|
format.html{render :action => 'search'}
format.xml
end
end
in my model i gave
acts_as_solr :fields => [ :name ]
when i tried with search
puts "------------------------------#{@emp}" shows me the following
As your example shows, when you do Employee.find_by_solr(@id) it does not return an Employee instance, but returns an instance of ActsAsSolr::SearchResults