diff --git a/lib/grape/roar/decorator.rb b/lib/grape/roar/decorator.rb index 923f103..84eda70 100644 --- a/lib/grape/roar/decorator.rb +++ b/lib/grape/roar/decorator.rb @@ -4,7 +4,7 @@ module Grape module Roar class Decorator < ::Roar::Decorator def self.represent(object, _options = {}) - new(object) + super(object) end end end diff --git a/lib/grape/roar/representer.rb b/lib/grape/roar/representer.rb index e24678a..44c905e 100644 --- a/lib/grape/roar/representer.rb +++ b/lib/grape/roar/representer.rb @@ -2,13 +2,14 @@ module Grape module Roar module Representer def self.included(base) + super + base.send(:include, ::Roar::Representer) base.extend(ClassMethods) end module ClassMethods def represent(object, _options = {}) - object.extend self - object + super(object) end end end