Thanks for the quick response and the logging tip.
But more importantly, since yesterday doing a search has caused an
exception:
since yesterday? What did you change?
Having looked at this again, this problem was introduced when I upgraded
the version to the trunk and switched to the drb server.
A NoMethodError occurred in partners#user_search:
undefined method each' for :sales_region:Symbol [RAILS_ROOT]/vendor/plugins/acts_as_ferret/lib/class_methods.rb:246:inretrieve_records’
Any idea what these could have been caused by?
not yet - I can’t seem to find the line the error refers too - what
exact
revision are you on? Or could you try that with the latest trunk (rev.
247).
How do you use that symbol in your code?
I just used the trunk, how can I find out which revision it was now?
The error is caused by the following include: @results = User.find_by_contents(@query, {
:limit=>5000},:conditions=>“sales_regions.firm_id in
(#{firm_id_string})”,:include => :sales_region)
The code from aaf is here:
def retrieve_records(id_arrays, find_options = {})
result = []
# get objects for each model
id_arrays.each do |model, id_array|
next if id_array.empty?
begin
model = model.constantize
rescue
raise “Please use ‘:store_class_name => true’ if you want to
use multi_search.\n#{$!}”
end
# check for include association that might only exist on some
models in case of multi_search
filtered_include_options = []
if include_options = find_options[:include]
include_options.each do |include_option|
filtered_include_options << include_option if
model.reflections.has_key?(include_option.is_a?(Hash) ?
include_option.keys[0].to_sym : include_option.to_sym)
end
end
It’s the include_options.each do |include_option| causing the problem.
Thanks for your quick responses by the way, they are amazing.
On Mon, Oct 01, 2007 at 04:01:43PM +0200, Chris W. wrote:
Thanks for the quick response and the logging tip.
But more importantly, since yesterday doing a search has caused an
exception:
since yesterday? What did you change?
Having looked at this again, this problem was introduced when I upgraded
the version to the trunk and switched to the drb server.
given the fact that this bug is fixed for more than a month now, I
suspect you still have an old version of the plugin somewhere…
Cheers,
Jens
–
Jens Krämer
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-0 | Telefax +49 351 46766-66 [email protected] | www.webit.de
Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa