Sha256: a4c8dfa20c64ebb078e4c6143029eedf10c8be501f4c3feacc302b7adf6aa8b2

Contents?: true

Size: 716 Bytes

Versions: 13

Compression:

Stored size: 716 Bytes

Contents

module Of
  class OfferDecorator < ::ApplicationDecorator
    decorates 'Of::Offer'
    delegate_all

    def items_list(thumb_size = 'thumb_md', page=1, per_page = 16)
      its = model.items
                .includes(item_props: {prop_name: [:uom, :related]})
                .includes(:iphotos)
                .includes(:strsubcat)
                .paginate(page: page, per_page: per_page)
      items = C80Yax::ItemDecorator.decorate_collection(its)

      h.render partial: 'c80_yax/items/index',
             locals: {
                 items: items,
                 without_paginator: false,
                 will_paginate_items: its,
                 thumb_size: thumb_size
             }
    end

  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
c80_yax-0.1.0.25 engines/of/app/decorators/of/offer_decorator.rb
c80_yax-0.1.0.24 engines/of/app/decorators/of/offer_decorator.rb
c80_yax-0.1.0.23 engines/of/app/decorators/of/offer_decorator.rb
c80_yax-0.1.0.22 engines/of/app/decorators/of/offer_decorator.rb
c80_yax-0.1.0.21 engines/of/app/decorators/of/offer_decorator.rb
c80_yax-0.1.0.20 engines/of/app/decorators/of/offer_decorator.rb
c80_yax-0.1.0.18 engines/of/app/decorators/of/offer_decorator.rb
c80_yax-0.1.0.17 engines/of/app/decorators/of/offer_decorator.rb
c80_yax-0.1.0.16 engines/of/app/decorators/of/offer_decorator.rb
c80_yax-0.1.0.15 engines/of/app/decorators/of/offer_decorator.rb
c80_yax-0.1.0.14 engines/of/app/decorators/of/offer_decorator.rb
c80_yax-0.1.0.13 engines/of/app/decorators/of/offer_decorator.rb
c80_yax-0.1.0.12 engines/of/app/decorators/of/offer_decorator.rb