crowdint / rails3-jquery-autocomplete

An easy and unobtrusive way to use jQuery's autocomplete with Rails 3
http://rubygems.org/gems/rails3-jquery-autocomplete
MIT License
917 stars 367 forks source link

Specifying custom encoder via block doesn't work. #253

Closed estum closed 10 years ago

estum commented 10 years ago

I can't change encoder to provide support with the ActiveModel::Serializers gem.

This feature described in README, but doesn't work:

json encoder

Autocomplete uses Yajl as JSON encoder/decoder, but you can specify your own

class ProductsController < Admin::BaseController
  autocomplete :brand, :name do |items|
     CustomJSON::Encoder.encode(items)
  end
end