Merge branch 'ticket/release-v2.0.0/350-remove-freeze-from-settings' into release-v2.0.0

This commit is contained in:
Eric Davis 2011-06-17 14:42:26 -07:00
commit 8698b40974
1 changed files with 2 additions and 2 deletions

View File

@ -96,7 +96,7 @@ class Setting < ActiveRecord::Base
# Returns the value of the setting named name
def self.[](name)
Marshal.load(Rails.cache.fetch("chiliproject/setting/#{name}") {Marshal.dump(find_or_default(name).value)}).freeze
Marshal.load(Rails.cache.fetch("chiliproject/setting/#{name}") {Marshal.dump(find_or_default(name).value)})
end
def self.[]=(name, v)
@ -104,7 +104,7 @@ class Setting < ActiveRecord::Base
setting.value = (v ? v : "")
Rails.cache.delete "chiliproject/setting/#{name}"
setting.save
setting.value.freeze
setting.value
end
# Defines getter and setter for each setting