jrallison / authlogic_oauth

Authlogic OAuth is an extension of the Authlogic library to add OAuth support. OAuth can be used to allow users to login with their Twitter credentials.
authlogic-oauth.heroku.com
MIT License
165 stars 25 forks source link

block_given? wrong in save #10

Open aac opened 14 years ago

aac commented 14 years ago

I use the following code in my create action in the users controller. In the debugger, block_given? returns false, leading to problems. Is this expected?

@user.save true do |result|
  if result
    flash[:notice] = "Authorization successful!"
    redirect_back_or_default account_url
  else
    render :action => :new
  end
end
aac commented 14 years ago

Uh, this was a red herring. There's a better description of my struggles here: http://groups.google.com/group/authlogic/browse_thread/thread/25e420f15c5eea78#

jaycode commented 14 years ago

I changed them to block.blank? but until now I haven't got this plugin to work. Sigh... why do they keep posting non-working plugins...?