lib/puffer/controller/config.rb in puffer-0.0.15 vs lib/puffer/controller/config.rb in puffer-0.0.16
- old
+ new
@@ -5,22 +5,22 @@
def self.included base
base.class_eval do
extend ClassMethods
include InstanceMethods
- puffer_class_attribute :group, :default
- puffer_class_attribute :model
+ puffer_class_attribute :group
+ puffer_class_attribute :model_name
puffer_class_attribute :destroy, true
helper_method :configuration
end
end
module InstanceMethods
def configuration
- @configuration ||= Config.new(self.class)
+ self.class.configuration
end
end
module ClassMethods
@@ -28,10 +28,10 @@
def puffer_class_attribute name, default = nil
class_attribute "_puffer_attribute_#{name}"
send "_puffer_attribute_#{name}=", default
end
- def configure &block
+ def setup &block
block.bind(Config.new(self)).call
end
def configuration
@configuration ||= Config.new(self)