molten-trunk/molten5_withgrid/vendor/plugins/acts_as_ferret/lib/ferret_server.rb
# handles all incoming method calls, and sends them on to the LocalIndex
# instance of the correct model class.
#
# Calls are not queued atm, so this will block until the call returned.
#
handles all incoming method calls, and sends them on to the LocalIndex
instance of the correct model class.

Calls are not queued atm, so this will block until the call returned.
handles all incoming method calls and sends them on to the LocalIndex instance of the correct model class . Calls are not queued atm so this will block until the call returned .
def method_missing(name, *args)
        @logger.debug "\#method_missing(#{name.inspect}, #{args.inspect})"
        with_class args.shift do |clazz|
          begin
            clazz.aaf_index.send name, *args
          rescue NoMethodError
            @logger.debug "no luck, trying to call class method instead"
            clazz.send name, *args
          end
        end
      rescue
        @logger.error "ferret server error #{$!}\n#{$!.backtrace.join '\n'}"
        raise
      end
def method_missing ( name , * args ) @logger . debug "\#method_missing(#{name.inspect}, #{args.inspect})" with_class args . shift do | clazz | begin clazz . aaf_index . send name , * args rescue NoMethodError @logger . debug "no luck, trying to call class method instead" clazz . send name , * args end end rescue @logger . error "ferret server error #{$!}\n#{$!.backtrace.join '\n'}" raise end
handles all incoming method calls, and sends them on to the LocalIndex
instance of the correct model class.
handles all incoming method calls and sends them on to the LocalIndex instance of the correct model class .
name
args