Sha256: 57bc3e8696f9844146e9fc10c535d66a28872be30a9746152e7ac68784815072
Contents?: true
Size: 609 Bytes
Versions: 17
Compression:
Stored size: 609 Bytes
Contents
# frozen_string_literal: true # Tag for text content that is going to be rendered using text input # {{ cms:text identifier }} # class ComfortableMexicanSofa::Content::Tag::Text < ComfortableMexicanSofa::Content::Tag::Fragment def form_field(object_name, view, index) name = "#{object_name}[fragments_attributes][#{index}][content]" options = { id: form_field_id, class: "form-control" } input = view.send(:text_field_tag, name, content, options) yield input end end ComfortableMexicanSofa::Content::Renderer.register_tag( :text, ComfortableMexicanSofa::Content::Tag::Text )
Version data entries
17 entries across 17 versions & 6 rubygems