Sha256: 4ec226ce7346e7c8410d6f517dbfe44f9ee9c4e35975257281089fe9d7ae7ca3
Contents?: true
Size: 557 Bytes
Versions: 1
Compression:
Stored size: 557 Bytes
Contents
# frozen_string_literal: true # Tag for text content that is going to be rendered using number input # {{ cms:number identifier }} # class Occams::Content::Tag::Number < 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(:number_field_tag, name, content, options) yield input end end Occams::Content::Renderer.register_tag( :number, Occams::Content::Tag::Number )
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
occams-1.0.0 | lib/occams/content/tags/number.rb |