Sha256: 81bf8a251561ece8858e874831d8e7968cb4e8602c52283df4bec6e9411e4af7
Contents?: true
Size: 659 Bytes
Versions: 20
Compression:
Stored size: 659 Bytes
Contents
require 'active_support/concern' module Model::Ecm::Cms::NavigationItem module PropertiesConcern extend ActiveSupport::Concern included do serialize :properties, OpenStruct delegate *Ecm::Cms::Configuration.navigation_item_properties, to: :li_attributes delegate *Ecm::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
20 entries across 20 versions & 1 rubygems