summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-09-18 17:50:17 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-09-18 17:50:17 +0000
commit25012efc9c9b7623937fdb5c944364a6ed9736cb (patch)
treecdd61bfc9437a5956261ad6916b3ce6dfde9036b /app
parenteb371db5b96ebd2471cef8156bf6e19e9d97bc06 (diff)
downloadredmine-25012efc9c9b7623937fdb5c944364a6ed9736cb.tar.gz
redmine-25012efc9c9b7623937fdb5c944364a6ed9736cb.zip
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
Diffstat (limited to 'app')
-rw-r--r--app/models/setting.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/setting.rb b/app/models/setting.rb
index d4c82191a..5341cc952 100644
--- a/app/models/setting.rb
+++ b/app/models/setting.rb
@@ -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]