class User < ActiveRecord::Model has_one :facebook_account has_one :twitter_account end というように、なっていてほしい。 でもって、ログイン処理の対象になるのは FacebookAccount や TwitterAccount でなくて User モデルであってほしい。 最初 devise でそういうことをやろうとしたんだけど、なんだかうまくいかなくて authlogic に乗り換えたわけです。 authlogic にも Facebook とか OpenID とかの Add on があるみたいなんですが、そちらはどんな実装になっているのかコードを読み切れなかったので、使っていません。 認証に関しては、対応サービスも多い OmniAuth 使うことにしました。 authlogic の準備 authlogi