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

Allow Model Methods to be accessed through :extra_data #259

Closed tohyongcheng closed 10 years ago

tohyongcheng commented 10 years ago

I think it would be a good idea to be able to access the model's methods e.g. to get a user's picture model's url.

I haven't looked much into the code to edit yet, but what do you all think?

bigtunacan commented 10 years ago

Not sure that there is a huge benefit to that and it would seem less secure to open up the entire model's methods in this manner. You can already access anything you need from the models by overriding the get_autocomplete_items method if you need more customization; this is a pretty common practice.