]> source.dussan.org Git - redmine.git/commitdiff
* fixed a variable name error in Setting
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 2 Feb 2007 14:28:54 +0000 (14:28 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 2 Feb 2007 14:28:54 +0000 (14:28 +0000)
* setting values to_s

git-svn-id: http://redmine.rubyforge.org/svn/trunk@213 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/setting.rb

index 7350d9123eed653c451c9d68f99b313ac1d1e1ff..56f7a524250fa47bcd08ecb2dc1ebeb711817796 100644 (file)
@@ -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__