Billfold provides backend Rails support for OmniAuth. Specifically, it
Billfold::IdentitiesController#update_or_create, which handles
updating and creating user identities from OmniAuth hashes. It also
GET /identities and
DELETE /identities/:id for users to manage
the identities attached to their account.
- Rails 3.x
gem 'billfold'to your
rails g billfold:migrationif you're using Rails migrations
If you don't have User and Identity model classes, run
rails g billfold:models to create them. Otherwise, include
them respectively. You may wish to define
User#perform_additional_merge_operations! if you need to do additional
logic during a user merge.
Billfold::Identity in the model classes.
You'll also have do define the following methods:
In either case, if you want to use something other than
for your classes, you can, but you have to tell Billfold. You can do that like
Billfold.user_class_name = 'My::User' Billfold.identity_class_name = 'My::UserIdentity'
config/locales/en.yml for a list of keys that must be translated to
make the models, views, and controllers fully internationalized.