lib/config_manager.rb
# Made the item.name like a writer
Made the item.name like a writer
Made the item . name like a writer
def add_setting_writer(item)
      self.send(:define_method, "#{item.name}=") do |newvalue|
        old = send(item.name)
        retval = settings[item.name] = canonicalize(item.name, newvalue)
        self.settings_changed << item.name unless old == retval
        unless new_record?
          self.settings_will_change!
        end
        retval
      end
    end
def add_setting_writer ( item ) self . send ( :define_method , "#{item.name}=" ) do | newvalue | old = send ( item . name ) retval = settings [ item . name ] = canonicalize ( item . name , newvalue ) self . settings_changed << item . name unless old == retval unless new_record? self . settings_will_change! end retval end end
Made the item.name like a writer
Made the item . name like a writer
item
<not_specific>