Sha256: d538d6d6215d238f51dd5060072233387639e4bb58ee36ad74b8b43dac866e00
Contents?: true
Size: 545 Bytes
Versions: 1
Compression:
Stored size: 545 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
occams-1.0.0 | lib/occams/content/tags/text.rb |