Class: Clot::InputTag
- Defined in:
- lib/clot/no_model_form_tags.rb
Direct Known Subclasses
FileFieldTag, HiddenFieldTag, PasswordFieldTag, TextFieldTag
Constant Summary
Constants inherited from ClotTag
Instance Method Summary collapse
Methods inherited from ClotTag
Methods included from TagHelper
Methods included from AttributeSetter
#set_attributes, #set_primary_attributes
Constructor Details
This class inherits a constructor from Clot::ClotTag
Instance Method Details
#personal_attributes(name, value) ⇒ Object
81 82 83 84 85 86 87 88 |
# File 'lib/clot/no_model_form_tags.rb', line 81 def personal_attributes(name,value) case name when "size" then @size_string = %{size="#{value}" } when "width" then @size_string = %{width="#{value}" } end end |
#render_string ⇒ Object
90 91 92 93 94 95 96 |
# File 'lib/clot/no_model_form_tags.rb', line 90 def render_string unless @value_string.nil? @value_string = CGI::escapeHTML(@value_string.to_s) @value_string = %{value="#{@value_string}" } end %{<input #{@accept_string}#{@disabled_string}#{@class_string}id="#{@id_string}" #{@max_length_string}name="#{@name_string}" #{@size_string}#{@onchange_string}type="#{@type}" #{@value_string}/>} end |