Fixed: Oracle error when saving serialized setting (eg. mail notifications)

git-svn-id: http://redmine.rubyforge.org/svn/trunk@742 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2007-09-18 17:50:17 +00:00
parent eb371db5b9
commit 25012efc9c
2 changed files with 11 additions and 0 deletions
+5
View File
@@ -35,6 +35,11 @@ class Setting < ActiveRecord::Base
v
end
def value=(v)
v = v.to_yaml if @@available_settings[name]['serialized'] && v.is_a?(String)
write_attribute(:value, v)
end
# Returns the value of the setting named name
def self.[](name)
v = @cached_settings[name]