autosuggest-rb 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -75,6 +75,7 @@ But you can pass options in by using the autosuggest_options param
75
75
 
76
76
  f.autosuggest_field :tags, autosuggest_tag_name_recipes_path, :autosuggest_options => {"neverSubmit" => "true"}
77
77
 
78
+ NOTE: When using the preFill option, make sure to pass in a ruby hash and not a json string
78
79
 
79
80
  Here are the other options you can pass in:
80
81
 
@@ -155,6 +156,6 @@ Pull requests are very welcome! Make sure your patches are unit tested. Please d
155
156
 
156
157
  ## Copyright
157
158
 
158
- Copyright (c) 2009 Derrick Camerino. See LICENSE for details.
159
+ Copyright (c) 2011 Derrick Camerino. See LICENSE for details.
159
160
 
160
161
 
@@ -15,7 +15,7 @@ module Autosuggest
15
15
  define_method "autosuggest_#{object}_#{name}" do
16
16
  options.merge!(:query => params[:query], :object => objectify(object), :like_clause => resolve_like_clause)
17
17
  results = db_store(object).query(options)
18
- render :json => Yajl::Encoder.encode(results.map{|r| {:name => r.send(options[:display]), :value => r.id}})
18
+ render :json => Yajl::Encoder.encode(results.map{|r| {:name => r.send(options[:display]), :value => r.id.to_s}})
19
19
  end
20
20
  end
21
21
  end
@@ -1,3 +1,3 @@
1
1
  module Autosuggest
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: autosuggest-rb
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.5
5
+ version: 0.1.6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Derrick Camerino
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-06-05 00:00:00 -07:00
13
+ date: 2011-06-27 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency