JackAdams / meteor-editable-text

Drop-in editable text widget for meteor

Home Page:http://editable-text-demo.taonova.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't update user profile data

opened this issue · comments

This code doesn't update the profile.city field:
{{> editableText collection="Meteor.users" field="profile.city" userCanEdit=userEditProfile}}

I have not made any changes to allow/deny rules for user profiles. Any idea how to solve this?

Try:

{{> editableText collection="users" field="profile.city" userCanEdit=userEditProfile}}

I'm pretty sure the collection name has to be the name of the collection in Mongo, not Meteor.

Thank you! It worked.

At first I was using 'users' for collection:
{{> editableText collection="users" field="city" userCanEdit=userEditProfile}}
But my data context was originally {{currentUser.profile}} rather than {{currentUser}} which also failed to update.

I actually changed 'users' to 'Meteor.users' based on this stack exchange answer:
http://stackoverflow.com/a/29136690/5195277