User display format is now configurable in administration settings.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1103 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -53,12 +53,13 @@ class Setting < ActiveRecord::Base
|
||||
v = read_attribute(:value)
|
||||
# Unserialize serialized settings
|
||||
v = YAML::load(v) if @@available_settings[name]['serialized'] && v.is_a?(String)
|
||||
v = v.to_sym if @@available_settings[name]['format'] == 'symbol' && !v.blank?
|
||||
v
|
||||
end
|
||||
|
||||
def value=(v)
|
||||
v = v.to_yaml if v && @@available_settings[name]['serialized']
|
||||
write_attribute(:value, v)
|
||||
write_attribute(:value, v.to_s)
|
||||
end
|
||||
|
||||
# Returns the value of the setting named name
|
||||
|
||||
Reference in New Issue
Block a user