Sha256: e78ee98c11dbc115463c2c292675265c06281f67e8103ede329f8372cd826fee
Contents?: true
Size: 500 Bytes
Versions: 26
Compression:
Stored size: 500 Bytes
Contents
module Locomotive module Concerns module Page module EditableElements extend ActiveSupport::Concern included do embeds_many :editable_elements, class_name: 'Locomotive::EditableElement', cascade_callbacks: true accepts_nested_attributes_for :editable_elements end def find_editable_element(block, slug) self.editable_elements.detect { |el| el.block == block && el.slug == slug } end end end end end
Version data entries
26 entries across 26 versions & 1 rubygems