Sha256: 79ee71a97088bf1fea23d31a79983434a6eeade2782c6b596947fb6f38a4d87c
Contents?: true
Size: 421 Bytes
Versions: 2
Compression:
Stored size: 421 Bytes
Contents
class Wallaby::DecoratorFinder DEFAULT_DECORATOR = Wallaby::ResourceDecorator def self.find_model(model_class) Wallaby::Map.decorator_map[model_class] || new_model(model_class) end def self.find_resource(model_class) Wallaby::Map.decorator_map[model_class] || DEFAULT_DECORATOR end def self.new_model(model_class) mode = Wallaby::ActiveRecord mode.model_decorator.new model_class end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
wallaby-4.1.6 | lib/services/wallaby/decorator_finder.rb |
wallaby-5.0.1 | lib/services/wallaby/decorator_finder.rb |