From c1537b52913db07e46fd9705dadb330ba845934d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 2 Feb 2007 14:28:54 +0000 Subject: [PATCH] * fixed a variable name error in Setting * setting values to_s git-svn-id: http://redmine.rubyforge.org/svn/trunk@213 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/setting.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/setting.rb b/app/models/setting.rb index 7350d9123..56f7a5242 100644 --- a/app/models/setting.rb +++ b/app/models/setting.rb @@ -37,7 +37,7 @@ class Setting < ActiveRecord::Base def self.[]=(name, value) setting = get(name) - setting.value = value + setting.value = (value ? value.to_s : "") setting.save setting.value end @@ -53,7 +53,7 @@ class Setting < ActiveRecord::Base end def self.#{name}=(value) - self[:#{name}] = values + self[:#{name}] = value end END_SRC class_eval src, __FILE__, __LINE__