I am trying to get authlogic and openid happening in my app. So far its been seriously unpleasant. I have tried to follow the Railscasts on the topic but none of the gems or plugins seem to work.
A after reading about a previous error I ended up installing this open-id plugin (mentioned at the bottom of that page). Now I am getting the error:
ActionView::TemplateError (undefined method `openid_identifier' for #<AccountSession: no credentials provided>) on line #13 of app/views/account_sessions/new.html.haml:
I can't decide if this is an improvement yet.
The view:
%h3
Login:
- form_for(@account_session) do |f|
= f.error_messages
%p
=t 'account.login'
=f.text_field :login
%p
=t 'account.password'
=f.password_field :password
%p
=t 'account.openid_identifier'
=f.text_field :openid_identifier
The controller:
class AccountSessionsController < ApplicationController
def new
@account_session = AccountSession.new
end
def create
@account_session = AccountSession.new(params[:account_session])
@account_session.save do |result|
if result
flash[:notice] = I18n.t 'session.login_success'
redirect_to root_url
else
render :action => "new"
end
end
end
def destroy
@Account_session = AccountSession.find
@Account_session.destroy
flash[:notice] = I18n.t('session.logout_message')
redirect_to root_url
end
end
gems installed:
authlogic (2.1.5, 2.1.4, 2.1.3)
authlogic-oid (1.0.4)
ruby-openid (2.1.8, 2.1.7)
It would be great news to hear it was just me doing something dumb. Its late and I've been looking at this too long so its quite possible.
Thanks!