I'd like to see the output of some of my Draper Decorators in Rails console (https://github.com/drapergem/draper and http://railscasts.com/episodes/286-draper). To do so, I was looking for a way to include a decorator and its methods similar to as we would an application helper:
include ActionView::ApplicationHelper
A draper decorator inherits from an ApplicationDecorator, which inherits from Draper::Base
class ApplicationDecorator < Draper::Base
end
class MaterialDecorator < ApplicationDecorator
decorates :material
#methods to decorate your material..
end
I've tried include Draper::Base::MaterialDecorator
, include ApplicationDecorator::MaterialDecorator
, and some other similar variations with no luck.
How can I include a decorator such as the Material Decorator above in rails console?