开发者

meta_search wrong number of arguments

开发者 https://www.devze.com 2023-01-23 20:28 出处:网络
I am using meta_search plugin开发者_如何学运维 with my rails3 app for search functionality. When I want to try the search method of meta_search plugin on my model in console, it gives me this error. I

I am using meta_search plugin开发者_如何学运维 with my rails3 app for search functionality. When I want to try the search method of meta_search plugin on my model in console, it gives me this error. I am not able to figure the error from the plugin source code.

Listing.search(:address1_starts_with => ["lucky"])
ArgumentError: wrong number of arguments (1 for 2)

please help


A little late to this party but you shouldn't be supplying the parameter as an array.

Listing.search(:address1_starts_with => "lucky")

should do the trick.

0

精彩评论

暂无评论...
验证码 换一张
取 消