Sha256: a85a078ed1419d1096a01274f4dfe91f388bfee6b771c130446128bcccfc0ddd
Contents?: true
Size: 543 Bytes
Versions: 10
Compression:
Stored size: 543 Bytes
Contents
# frozen_string_literal: true # Tag for text content that is going to be rendered using text input # {{ cms:text identifier }} # class Occams::Content::Tag::Text < Occams::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 Occams::Content::Renderer.register_tag( :text, Occams::Content::Tag::Text )
Version data entries
10 entries across 10 versions & 1 rubygems