diaspora/config/initializers/patch_openssl_pkey.rb
maxwell 7a5852e73a fix a bug with openssl keys in development. note to future max and
rafi.  never monkey patch anything on the top of a completely random
model. never again. ever.

TODO: look into replacing a monkey patch on a to_s in User#generate_key
that makes the single test green, but my dell had a heart attack other
places, that might just be sqlite3 or my dell
2011-07-24 20:06:07 -07:00

14 lines
443 B
Ruby

# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
#
#
#
#Why? as of rails 3.0.4, objects are marshalled by calling to yaml, if it is a text field in the db. since we assume things are strings coming out, and pkey does not seem to define a to_yaml, it was getting set to nil
class OpenSSL::PKey::RSA
def to_yaml
self.to_s
end
end