If the twitter_id column exists on the model, it will be populated with twitter's user_id.
This patch updates both the collection of the twitter_id and the migration templates.
Twitter API supports the trim_user=true option which only returns the numeric user_id for the user information (instead of the full info, which can be redundant and add unneeded parsing/network overhead)
Allow capturing the twitter user id during signup and connect. This i…
…s specially useful when using trim_user=true parameter on calls to the twitter API.
Use twitter user_id when looking up existing users instead of twitter…
Twitter_handle can now be optional.
Update twitter_handle if changed since the previous connect/signup
UNTESTED: As far as I can tell, queries use a Mongoid-compatible syntax.
Additional commit for issue http://github.com/MSch/devise-twitter/issues#issue/12 , including updating the twitter_handle on connect/signup (and making it optional on the model)
It should also address Mongoid compatibility (a different approach than used by jtoy, which didn't work for me with Rails3+Arel)
Lookup users by twitter_id on signup, instead of by oauth_credentials…
…. This allows linking with users we already known because we saw them on other user's timeline (for instance).
In this case, we also need to update the oauth_credentials.