This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def activate_session!(code, ip, user_agent) | |
if BCrypt::Password.new(hashed_code) == code | |
self.activated_at = DateTime.now | |
self.ip = ip | |
self.user_agent = user_agent | |
save | |
else | |
false | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def validate_code!(code, ip, user_agent) | |
if BCrypt::Password.new(hashed_code) == code | |
self.activated_at = DateTime.now | |
save | |
else | |
false | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def validate_code!(code) | |
if BCrypt::Password.new(code) == hashed_code | |
self.activated_at = DateTime.now | |
save | |
else | |
false | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def validate_code!(code) | |
if BCrypt::Password.new(code) == hashed_code | |
self.activated_at = Time.now | |
save | |
else | |
false | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Class TriggerFactory | |
* | |
* Used to instantiate and execute Trigger Handlers associated with sObjects. | |
*/ | |
public with sharing class TriggerFactory | |
{ | |
// Generate unique executionId for debuging execution results | |
private static String executionId; |