Sha256: 458d1c8d978f546aeacf0b07d66e37c1f859f5c5ab8e1c8215fb17c6df91cc6e

Contents?: true

Size: 369 Bytes

Versions: 27

Compression:

Stored size: 369 Bytes

Contents

module Spina
  module Parts
    class RepeaterContent < Base
      include Partable
      include AttrJson::NestedAttributes

      attr_json :parts, AttrJson::Type::SpinaPartsModel.new, array: true
      attr_json_accepts_nested_attributes_for :parts

      def find_part(name)
        (parts || []).find{|part| part.name.to_s == name.to_s}
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
spina-2.12.0 app/models/spina/parts/repeater_content.rb
spina-2.11.0 app/models/spina/parts/repeater_content.rb
spina-2.10.0 app/models/spina/parts/repeater_content.rb
spina-2.9.1 app/models/spina/parts/repeater_content.rb
spina-2.9.0 app/models/spina/parts/repeater_content.rb
spina-2.8.1 app/models/spina/parts/repeater_content.rb
spina-2.8.0 app/models/spina/parts/repeater_content.rb
spina-2.7.0 app/models/spina/parts/repeater_content.rb
spina-2.6.2 app/models/spina/parts/repeater_content.rb
spina-2.6.1 app/models/spina/parts/repeater_content.rb
spina-2.6.0 app/models/spina/parts/repeater_content.rb
spina-2.5.0 app/models/spina/parts/repeater_content.rb
spina-2.4.0 app/models/spina/parts/repeater_content.rb
spina-2.3.5 app/models/spina/parts/repeater_content.rb
spina-2.3.4 app/models/spina/parts/repeater_content.rb
spina-2.3.3 app/models/spina/parts/repeater_content.rb
spina-2.3.2 app/models/spina/parts/repeater_content.rb
spina-2.3.1 app/models/spina/parts/repeater_content.rb
spina-2.3.0 app/models/spina/parts/repeater_content.rb
spina-2.2.0 app/models/spina/parts/repeater_content.rb