having a fix call order resolves a problem where

'value=' was called before 'name=' resulting in no
serialization
pull/41/head
Romano Licker 13 years ago
parent f191c1c73e
commit d2d21388ae
  1. 6
      app/models/setting.rb

@ -158,8 +158,10 @@ private
def self.find_or_default(name)
name = name.to_s
raise "There's no setting named #{name}" unless @@available_settings.has_key?(name)
setting = find_by_name(name)
setting ||= new(:name => name, :value => @@available_settings[name]['default']) if @@available_settings.has_key? name
find_by_name(name) or new do |s|
s.name = name
s.value = @@available_settings[name]['default']
end
end
def self.cache_key(name)

Loading…
Cancel
Save