Sha256: fa7c2d937d577677c8d00883bbebc4b91277812c6b36a5ac658d3b1e12247cd7
Contents?: true
Size: 945 Bytes
Versions: 25
Compression:
Stored size: 945 Bytes
Contents
module Workarea module Admin class ReleaseViewModel < ApplicationViewModel include CommentableViewModel def timeline @timeline ||= TimelineViewModel.new(model) end def changesets_with_releasable @changesets_with_releasable ||= model .changesets .map { |c| ChangesetViewModel.wrap(c) } .select { |changeset| changeset.root.present? } .reject { |changeset| changeset.releasable.blank? } end def calendar_at model.publish_at || model.published_at end def calendar_on calendar_at&.to_date end def undo return unless undo? @undo ||= ReleaseViewModel.wrap(model.undo, options) end def undoes return unless undoes? @undoes ||= ReleaseViewModel.wrap(model.undoes, options) end end end end
Version data entries
25 entries across 25 versions & 1 rubygems