Sha256: e25939596456babb51cf857f7f2a425aa1cdc8ba79209f9c829de1ed29956021
Contents?: true
Size: 909 Bytes
Versions: 54
Compression:
Stored size: 909 Bytes
Contents
module Locomotive module Steam class ContentTypeRepository include Models::Repository # Entity mapping mapping :content_types, entity: ContentType do embedded_association :entries_custom_fields, ContentTypeFieldRepository end def by_slug(slug_or_content_type) if slug_or_content_type.is_a?(String) query { where(slug: slug_or_content_type) }.first else slug_or_content_type end end def look_for_unique_fields(content_type) return nil if content_type.nil? content_type.fields.unique end def fields_for(content_type) return nil if content_type.nil? content_type.fields end def select_options(content_type, name) return nil if content_type.nil? || name.nil? content_type.fields.select_options(name.to_s) end end end end
Version data entries
54 entries across 54 versions & 1 rubygems