jrails_auto_complete:参数数量错误

时间:2009-09-09 11:27:59

标签: ruby-on-rails plugins jrails-auto-complete

我安装了Rails 2.3.3并且jrails_auto_complete插件似乎不起作用:


# 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 }

这是请求的网址:

http://localhost:3000/photos/auto_complete_for_photo_place?photo%5Bplace%5D=Test

这是回应:

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"}

1 个答案:

答案 0 :(得分:0)

我刚刚提交了修复程序:

http://github.com/collimarco/jrails_auto_complete