lib/happy/controller/configurable.rb in happy-0.1.0.pre20 vs lib/happy/controller/configurable.rb in happy-0.1.0.pre21

- old
+ new

@@ -1,20 +1,24 @@ module Happy class Controller module Configurable extend ActiveSupport::Concern - def config - self.class.config + def options + @options ||= self.class.options.dup end + def set(k, v) + options[k.to_sym] = v + end + module ClassMethods - def config - @config ||= {} + def options + @options ||= {} end def set(k, v) - config[k.to_sym] = v + options[k.to_sym] = v end end end end end