Don't generate #decorates.
We don't want to use that anymore.
This commit is contained in:
parent
087e134ed0
commit
ae852341c1
|
@ -1,6 +1,5 @@
|
||||||
<% module_namespacing do -%>
|
<% module_namespacing do -%>
|
||||||
class <%= class_name %>Decorator < <%= parent_class_name %>
|
class <%= class_name %>Decorator < <%= parent_class_name %>
|
||||||
decorates :<%= singular_name %>
|
|
||||||
|
|
||||||
# Accessing Helpers
|
# Accessing Helpers
|
||||||
# You can access any helper via a proxy
|
# You can access any helper via a proxy
|
||||||
|
|
|
@ -16,7 +16,6 @@ describe Rails::Generators::DecoratorGenerator do
|
||||||
subject { file('app/decorators/your_model_decorator.rb') }
|
subject { file('app/decorators/your_model_decorator.rb') }
|
||||||
it { should exist }
|
it { should exist }
|
||||||
it { should contain "class YourModelDecorator < Draper::Decorator" }
|
it { should contain "class YourModelDecorator < Draper::Decorator" }
|
||||||
it { should contain "decorates :your_model" }
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
require "./performance/models"
|
require "./performance/models"
|
||||||
class ProductDecorator < Draper::Decorator
|
class ProductDecorator < Draper::Decorator
|
||||||
decorates :product
|
|
||||||
|
|
||||||
def awesome_title
|
def awesome_title
|
||||||
"Awesome Title"
|
"Awesome Title"
|
||||||
|
@ -22,7 +21,6 @@ class ProductDecorator < Draper::Decorator
|
||||||
end
|
end
|
||||||
|
|
||||||
class FastProductDecorator < Draper::Decorator
|
class FastProductDecorator < Draper::Decorator
|
||||||
decorates :product
|
|
||||||
|
|
||||||
def awesome_title
|
def awesome_title
|
||||||
"Awesome Title"
|
"Awesome Title"
|
||||||
|
|
Loading…
Reference in New Issue