Sha256: 2ad71655d31f65f8db21f023f47b688c75c926fb1f689965596dd5f919cde17a

Contents?: true

Size: 520 Bytes

Versions: 10

Compression:

Stored size: 520 Bytes

Contents

class VendorsDecorator < BaseDecorator
  allows :id, :role, :remove_logo!

  protected 

  class << self
    delegate :lookup_ancestors, :i18n_scope, :to => :model_class
  end

  # simply send it all over to the model
  def method_missing(*args)
    model.send(*args)
  end

  def liquid_render(template)
    Liquid::Template.parse(template || '').render(liquid_context)
  end

  def config_render(key)
    liquid_render(E9::Config[key])
  end

  def liquid_context
    # from base_controller
    h.liquid_env
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
e9_vendors-0.0.10 app/decorators/vendors_decorator.rb
e9_vendors-0.0.9 app/decorators/vendors_decorator.rb
e9_vendors-0.0.8 app/decorators/vendors_decorator.rb
e9_vendors-0.0.7 app/decorators/vendors_decorator.rb
e9_vendors-0.0.6 app/decorators/vendors_decorator.rb
e9_vendors-0.0.5 app/decorators/vendors_decorator.rb
e9_vendors-0.0.4 app/decorators/vendors_decorator.rb
e9_vendors-0.0.3 app/decorators/vendors_decorator.rb
e9_vendors-0.0.2 app/decorators/vendors_decorator.rb
e9_vendors-0.0.1 app/decorators/vendors_decorator.rb