OpenID ログインと Google を Rails Web サイトに統合しようとしています。Devise & Omniauthの概要に従っています。何らかの理由で、エラーが発生しています。
Unknown action
The action 'google' could not be found for Devise::OmniauthCallbacksController
私のroutes.rb
持っている、
devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" }
users/omniauth_callbacks_controller.rb
もっている、
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
skip_before_filter :verify_authenticity_token, :only => [:google]
def google
.....
end
end
私のuser.rbは、
class User < ActiveRecord::Base
devise :omniauthable, :database_authenticatable, :registerable, :recoverable,
:rememberable, :trackable, :validatable
def self.find_for_open_id(access_token, signed_in_resource=nil)
....
end
end
初期化子/devise.rb
config.omniauth :open_id, :store => OpenID::Store::Filesystem.new('./tmp'), :name => 'google', :identifier => 'https://www.google.com/accounts/o8/id'
これはすべてwikiページに従って行われます。URL をクリックすると Google に移動し、資格情報を入力するとリダイレクトされます。ここで障害が発生します。
なぜこれが起こっているのかわかりません。どんな助けでも大歓迎です。