Created
September 2, 2011 04:47
-
-
Save temochka/1187931 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 self.find_by_email(email) | |
User.new :email => email | |
if engine_user = EngineUser.find_by_email(email) | |
return find_by_engine_user_id(engine_user.id) | |
end | |
end | |
def self.find_by_email!(email) | |
engine_user = self.find_by_email(email) | |
raise ActiveRecord::RecordNotFound unless engine_user | |
engine_user | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment