Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #264 from danielfarrell/mongoid-fix
1.0.13 broken for Mongoid, items is not an array
  • Loading branch information
bigtunacan committed Mar 19, 2014
2 parents 17b5f4a + bbda46d commit 8e9f3c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rails3-jquery-autocomplete/autocomplete.rb
Expand Up @@ -97,7 +97,7 @@ def get_object(model_sym)
# Hash also includes a key/value pair for each method in extra_data
#
def json_for_autocomplete(items, method, extra_data=[])
items.collect! do |item|
items = items.collect do |item|
hash = {"id" => item.id.to_s, "label" => item.send(method), "value" => item.send(method)}
extra_data.each do |datum|
hash[datum] = item.send(datum)
Expand Down

0 comments on commit 8e9f3c8

Please sign in to comment.