1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

Don't need to extend ActiveSupport::Concern anymore in oauth helpers

This commit is contained in:
Carlos Antonio da Silva 2010-09-26 11:47:56 -03:00
parent fbac68d51a
commit 6a09daf570
2 changed files with 3 additions and 4 deletions

View file

@ -24,7 +24,7 @@ module Devise
attr_accessor :password_confirmation
end
# Generators password encryption based on the value given.
# Generates password encryption based on the given value.
def password=(new_password)
@password = new_password
self.encrypted_password = password_digest(@password) if @password.present?

View file

@ -3,17 +3,16 @@ module Devise
# Provides a few helpers that are included in ActionController::Base
# for convenience.
module Helpers
extend ActiveSupport::Concern
protected
# Overwrite expire_session_data_after_sign_in! so it removes all
# oauth tokens from session ensuring registrations done in a row
# do not try to store the same token in the database.
# do not try to store the same token in the database.
def expire_session_data_after_sign_in!
super
session.keys.grep(/_oauth_token$/).each { |k| session.delete(k) }
end
end
end
end
end