Sha256: 0b8ca14044990c5382118debc523e4b0bb36566b788598ae35bc53dc904f4526
Contents?: true
Size: 648 Bytes
Versions: 19
Compression:
Stored size: 648 Bytes
Contents
module AdminIt module Helpers # class Input < WrapIt::Base html_class 'form-control' attr_accessor :field, :entity option :field, :entity argument :field, if: AdminIt::Field before_capture do html_attr[:type] = 'text' if field.is_a?(AdminIt::Field) context = @template.context resource = context.resource entity ||= context.entity html_attr[:name] = "#{resource.name}[#{field.name}]" html_attr[:id] = "#{resource.name}_#{field.name}" html_attr[:value] = field.render(entity, instance: self) end end end end end
Version data entries
19 entries across 19 versions & 1 rubygems