Skip to content

Commit

Permalink
Edited lib/rails3-jquery-autocomplete/autocomplete.rb via GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
slash4 committed Sep 22, 2011
1 parent eab3098 commit 0f3f54a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/rails3-jquery-autocomplete/autocomplete.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def self.included(target)
#
module ClassMethods
def autocomplete(object, method, options = {})
define_method("autocomplete_#{object}_#{method}") do
define_method("autocomplete_#{object}_#{method.first}") do

method = options[:column_name] if options.has_key?(:column_name)

Expand All @@ -57,7 +57,7 @@ def autocomplete(object, method, options = {})
items = {}
end

render :json => json_for_autocomplete(items, options[:display_value] ||= method, options[:extra_data])
render :json => json_for_autocomplete(items, options[:display_value] ||= method.first, options[:extra_data])
end
end
end
Expand Down

0 comments on commit 0f3f54a

Please sign in to comment.