-
Notifications
You must be signed in to change notification settings - Fork 0
Lessons Learned
Brian Simon edited this page May 16, 2014
·
25 revisions
- Mongoid: http://railscasts.com/episodes/238-mongoid-revised
- Google Contacts API: https://developers.google.com/google-apps/contacts/v3/ Bonus: import Outlook contacts and iPhone contacts
- Sorcery External Authentication: https://github.com/NoamB/sorcery/wiki/External
- Don't call a field :class in MongoDB or application will crash
Roadblocks:
- Handling duplicate contacts
- Offline contacts vs. Online synced contacts
For later: http://stackoverflow.com/questions/7996342/mongomapper-run-simple-mongodb-queries
You don't need Google API key when using gmaps4rails because it uses Google Maps Javascript API V3
http://stackoverflow.com/questions/5042829/google-maps-api-key-in-gmaps4rails
Updating instance variable in controller updates Mongodb database
Example - Search function for contacts - code below will modify user -> contacts
def show
@user = User.find(params[:id])
@user.contacts = if params[:search] && params[:search] != ""
@user.contacts.where(first_name: params[:search])
else
@user.contacts
end
end