views:

78

answers:

1

I have Rails 2.3.3 installed and jrails_auto_complete plugin seems not to work:


# View
text_field_with_auto_complete :photo, :place

# Controller
auto_complete_for :photo, :place

# Routes
map.auto_complete ':controller/:action', 
                    :requirements => { :action => /auto_complete_for_\S+/ },
                    :conditions => { :method => :get }

This is the URL which is requested:
http://localhost:3000/photos/auto_complete_for_photo_place?photo%5Bplace%5D=Test
And this the response:
ArgumentError in PhotosController#auto_complete_for_photo_place

wrong number of arguments (0 for 1)

Trace:

/Users/marco/Sites/foto-fiori/vendor/plugins/jrails_auto_complete/lib/jrails_auto_complete.rb:10:in `method'
/Users/marco/Sites/foto-fiori/vendor/plugins/jrails_auto_complete/lib/jrails_auto_complete.rb:10:in `auto_complete_for_photo_place'
/Users/marco/Sites/foto-fiori/vendor/rails/actionpack/lib/action_controller/base.rb:1327:in `send'
...

Request Parameters:

{"photo"=>{"place"=>"C"},
 "locale"=>"it"}

A: 

I have just submitted a fix:

http://github.com/collimarco/jrails%5Fauto%5Fcomplete

collimarco