Sha256: 591355b506281e336514d2dc6aa84e9b3f3c1ebf1372daea9a284e14828bb625

Contents?: true

Size: 572 Bytes

Versions: 32

Compression:

Stored size: 572 Bytes

Contents

module Locomotive
  module Steam

    class ContentTypeFieldSelectOptionRepository

      include Models::Repository

      attr_accessor :content_type_field

      # Entity mapping
      mapping :content_type_field_select_options, entity: ContentTypeField::SelectOption do
        default_attribute :field, -> (repository) { repository.content_type_field }

        localized_attributes :name
      end

      def all
        query { order_by(position: :asc) }.all
      end

      def by_name(name)
        query { where(name: name) }.first
      end

    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
locomotivecms_steam-1.5.0.beta1 lib/locomotive/steam/repositories/content_type_field_select_option_repository.rb
locomotivecms_steam-1.4.1 lib/locomotive/steam/repositories/content_type_field_select_option_repository.rb
locomotivecms_steam-1.4.0 lib/locomotive/steam/repositories/content_type_field_select_option_repository.rb
locomotivecms_steam-1.4.0.rc2 lib/locomotive/steam/repositories/content_type_field_select_option_repository.rb
locomotivecms_steam-1.4.0.rc1 lib/locomotive/steam/repositories/content_type_field_select_option_repository.rb
locomotivecms_steam-1.4.0.pre.rc.1 lib/locomotive/steam/repositories/content_type_field_select_option_repository.rb
locomotivecms_steam-1.3.0 lib/locomotive/steam/repositories/content_type_field_select_option_repository.rb
locomotivecms_steam-1.3.0.rc2 lib/locomotive/steam/repositories/content_type_field_select_option_repository.rb
locomotivecms_steam-1.1.2 lib/locomotive/steam/repositories/content_type_field_select_option_repository.rb
locomotivecms_steam-1.2.1 lib/locomotive/steam/repositories/content_type_field_select_option_repository.rb
locomotivecms_steam-1.3.0.rc1 lib/locomotive/steam/repositories/content_type_field_select_option_repository.rb
locomotivecms_steam-1.2.0 lib/locomotive/steam/repositories/content_type_field_select_option_repository.rb
locomotivecms_steam-1.2.0.rc3 lib/locomotive/steam/repositories/content_type_field_select_option_repository.rb
locomotivecms_steam-1.2.0.rc2 lib/locomotive/steam/repositories/content_type_field_select_option_repository.rb
locomotivecms_steam-1.2.0.rc1 lib/locomotive/steam/repositories/content_type_field_select_option_repository.rb
locomotivecms_steam-1.2.0.beta1 lib/locomotive/steam/repositories/content_type_field_select_option_repository.rb
locomotivecms_steam-1.1.1 lib/locomotive/steam/repositories/content_type_field_select_option_repository.rb
locomotivecms_steam-1.1.0 lib/locomotive/steam/repositories/content_type_field_select_option_repository.rb
locomotivecms_steam-1.1.0.rc3 lib/locomotive/steam/repositories/content_type_field_select_option_repository.rb
locomotivecms_steam-1.1.0.rc2 lib/locomotive/steam/repositories/content_type_field_select_option_repository.rb