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
# any idea how I could protect find_then_update_or_create_from_has with | |
# protect_from_non_user_hash by getting it to return what protect_from_non_user_hash | |
# returns? | |
# Basically use protect_from_non_user_hash to stop find_then_update_or_create_from_hash | |
class User < ActiveRecord::Base | |
def self.protect_from_non_user_hash(hash) | |
return nil if !hash.is_a?(Hash) || hash['error'] | |
end | |