diff --git a/lib/rails3-jquery-autocomplete/orm/active_record.rb b/lib/rails3-jquery-autocomplete/orm/active_record.rb index f89a06b2..980f0dcd 100644 --- a/lib/rails3-jquery-autocomplete/orm/active_record.rb +++ b/lib/rails3-jquery-autocomplete/orm/active_record.rb @@ -26,12 +26,9 @@ def get_autocomplete_items(parameters) items = items.select(get_autocomplete_select_clause(model, method, options)) unless options[:full_model] items = items.where(get_autocomplete_where_clause(model, term, method, options)). limit(limit).order(order) - puts "model #{model}" if model == WopEngine::Person - puts "if" items = items.joins("join wop_roles on wop_roles.person_id=wop_people.id").where("wop_roles.site_id = ?", site_id) unless site_id.nil? else - puts "else" items = items.where("#{model.table_name}.site_id = ?", site_id) unless site_id.nil? end end