Sha256: 8dae4b31b22a3c42e81a006a9fe05a78765520f16b01ff465184ba84620325ba

Contents?: true

Size: 662 Bytes

Versions: 39

Compression:

Stored size: 662 Bytes

Contents

require 'active_support/concern'

module Model::Cmor::Cms::NavigationItem
  module PropertiesConcern
    extend ActiveSupport::Concern

    included do
      serialize :properties, OpenStruct
      delegate *Cmor::Cms::Configuration.navigation_item_properties, to: :li_attributes
      delegate *Cmor::Cms::Configuration.navigation_item_properties.collect { |a| "#{a}=".to_sym }, to: :li_attributes
    end

    def highlights_on
      properties.highlights_on ||= nil
    end

    delegate :highlights_on=, to: :properties

    def li_attributes
      properties.li_attributes ||= OpenStruct.new
    end

    delegate :li_attributes=, to: :properties
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
cmor_cms-0.0.41.pre app/models/concerns/model/cmor/cms/navigation_item/properties_concern.rb
cmor_cms-0.0.40.pre app/models/concerns/model/cmor/cms/navigation_item/properties_concern.rb
cmor_cms-0.0.39.pre app/models/concerns/model/cmor/cms/navigation_item/properties_concern.rb
cmor_cms-0.0.38.pre app/models/concerns/model/cmor/cms/navigation_item/properties_concern.rb
cmor_cms-0.0.37.pre app/models/concerns/model/cmor/cms/navigation_item/properties_concern.rb
cmor_cms-0.0.36.pre app/models/concerns/model/cmor/cms/navigation_item/properties_concern.rb
cmor_cms-0.0.35.pre app/models/concerns/model/cmor/cms/navigation_item/properties_concern.rb
cmor_cms-0.0.34.pre app/models/concerns/model/cmor/cms/navigation_item/properties_concern.rb
cmor_cms-0.0.33.pre app/models/concerns/model/cmor/cms/navigation_item/properties_concern.rb
cmor_cms-0.0.32.pre app/models/concerns/model/cmor/cms/navigation_item/properties_concern.rb
cmor_cms-0.0.31.pre app/models/concerns/model/cmor/cms/navigation_item/properties_concern.rb
cmor_cms-0.0.30.pre app/models/concerns/model/cmor/cms/navigation_item/properties_concern.rb
cmor_cms-0.0.29.pre app/models/concerns/model/cmor/cms/navigation_item/properties_concern.rb
cmor_cms-0.0.28.pre app/models/concerns/model/cmor/cms/navigation_item/properties_concern.rb
cmor_cms-0.0.27.pre app/models/concerns/model/cmor/cms/navigation_item/properties_concern.rb
cmor_cms-0.0.26.pre app/models/concerns/model/cmor/cms/navigation_item/properties_concern.rb
cmor_cms-0.0.25.pre app/models/concerns/model/cmor/cms/navigation_item/properties_concern.rb
cmor_cms-0.0.24.pre app/models/concerns/model/cmor/cms/navigation_item/properties_concern.rb
cmor_cms-0.0.22.pre app/models/concerns/model/cmor/cms/navigation_item/properties_concern.rb
cmor_cms-0.0.21.pre app/models/concerns/model/cmor/cms/navigation_item/properties_concern.rb