Sha256: 907850a8613ee938c8571d3e57f60bbb1975cdafee5117816456e9050103a3be
Contents?: true
Size: 786 Bytes
Versions: 54
Compression:
Stored size: 786 Bytes
Contents
class Content < ApplicationRecord self.abstract_class = true include Mumuki::Domain::Syncable include WithDescription include WithLocale include WithMedal include WithName include WithProgress include WithSlug include WithUsages def to_resource_h(*args) to_expanded_resource_h(*args).compact end def to_expanded_resource_h(*) as_json(only: [:name, :slug, :description, :locale]).symbolize_keys end def fork_to!(organization, syncer, quiet: false) rebased_dup(organization).tap do |dup| self.class.find_by(slug: dup.slug).try { |it| return it } if quiet dup.validate! fork_children_into! dup, organization, syncer dup.save validate: false syncer.export! dup end end def public? !private? end end
Version data entries
54 entries across 54 versions & 2 rubygems