Sha256: cbc578e42ba2d79f0fa7a11f71a0f9860e86f5748ebb592f33a3896113be5f1f
Contents?: true
Size: 425 Bytes
Versions: 11
Compression:
Stored size: 425 Bytes
Contents
module Scrivito class ObjUiConfig < Struct.new(:obj) def self.mget(*ids) objs = Obj.find(ids) ids.map do |id| if obj = objs.find { |o| o.id == id } ObjUiConfig.new(obj) end end end def as_json { description_for_editor: obj.description_for_editor, info_for_content_browser: obj.try(:info_for_content_browser), }.compact end end end
Version data entries
11 entries across 11 versions & 1 rubygems