Skip to content

Commit

Permalink
HUM
Browse files Browse the repository at this point in the history
  • Loading branch information
slash4 committed Sep 26, 2013
1 parent 123f679 commit beba16e
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions lib/rails3-jquery-autocomplete/orm/active_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit beba16e

Please sign in to comment.