Sha256: 6642cf98ee9ed64755509e46cd37c3376b33f8cc5bf36060fae461ee1e01b89d
Contents?: true
Size: 578 Bytes
Versions: 3
Compression:
Stored size: 578 Bytes
Contents
# 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, &block) name = "#{object_name}[fragments_attributes][#{index}][content]" options = {id: nil, class: "form-control"} input = view.send(:text_field_tag, name, self.content, options) yield input end end ComfortableMexicanSofa::Content::Renderer.register_tag( :text, ComfortableMexicanSofa::Content::Tag::Text )
Version data entries
3 entries across 3 versions & 1 rubygems