I\'m using https://github.com/crowdint/rails3-jquery-autocomplete and it seems to be working. The only problem is lets say I have a field performing an autocomplete on all p
You can override get_autocomplete_items, but first use super to call the original get_autocomplete_items method, and then filter the results by current_user.id (or post.user.id if the owner of the post is not the current user)
def get_autocomplete_items(parameters)
items = super(parameters)
items = items.where(:user_id => current_user.id)
end
This way you can still all the other options that come with the gem. This should be done in your controller by the way.
Another answer suggested the :scope option. I looked into that, but it is not the way to go in this case, you don't want to add "current_user" and things like that to your models.