Sha256: ebcdd0d0a3cabbc334edb468755635353505a32dc7b205e2f47088a9021e1440
Contents?: true
Size: 716 Bytes
Versions: 28
Compression:
Stored size: 716 Bytes
Contents
module Workarea module Admin class BulkActionProductEditViewModel < ApplicationViewModel def template_options ProductViewModel.new.templates end def selected?(hash, field) model.send(hash).key?(field) end def selected_true?(hash, field) !selected?(hash, field) || send(hash)[field] == 'true' end def selected_false?(hash, field) send(hash)[field] == 'false' end def pricing_prices pricing.fetch('prices', []).first || {} end def segments return [] if settings['active_segment_ids'].blank? @segments ||= Segment.in(id: settings['active_segment_ids']).to_a end end end end
Version data entries
28 entries across 28 versions & 1 rubygems