From ae852341c1d7cd41084f98b1b78d2c8e18423dc2 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Thu, 29 Nov 2012 17:22:39 -0800 Subject: [PATCH] Don't generate #decorates. We don't want to use that anymore. --- lib/generators/decorator/templates/decorator.rb | 1 - spec/generators/decorator/decorator_generator_spec.rb | 1 - spec/performance/decorators.rb | 2 -- 3 files changed, 4 deletions(-) diff --git a/lib/generators/decorator/templates/decorator.rb b/lib/generators/decorator/templates/decorator.rb index 5788cb7..af40bd3 100644 --- a/lib/generators/decorator/templates/decorator.rb +++ b/lib/generators/decorator/templates/decorator.rb @@ -1,6 +1,5 @@ <% module_namespacing do -%> class <%= class_name %>Decorator < <%= parent_class_name %> - decorates :<%= singular_name %> # Accessing Helpers # You can access any helper via a proxy diff --git a/spec/generators/decorator/decorator_generator_spec.rb b/spec/generators/decorator/decorator_generator_spec.rb index da9b199..4ef8bbb 100644 --- a/spec/generators/decorator/decorator_generator_spec.rb +++ b/spec/generators/decorator/decorator_generator_spec.rb @@ -16,7 +16,6 @@ describe Rails::Generators::DecoratorGenerator do subject { file('app/decorators/your_model_decorator.rb') } it { should exist } it { should contain "class YourModelDecorator < Draper::Decorator" } - it { should contain "decorates :your_model" } end end diff --git a/spec/performance/decorators.rb b/spec/performance/decorators.rb index ba19aba..d11faf3 100644 --- a/spec/performance/decorators.rb +++ b/spec/performance/decorators.rb @@ -1,6 +1,5 @@ require "./performance/models" class ProductDecorator < Draper::Decorator - decorates :product def awesome_title "Awesome Title" @@ -22,7 +21,6 @@ class ProductDecorator < Draper::Decorator end class FastProductDecorator < Draper::Decorator - decorates :product def awesome_title "Awesome Title"