Class: Clot::InputTag
- Defined in:
- lib/clot/no_model_form_tags.rb
Direct Known Subclasses
FileFieldTag, HiddenFieldTag, PasswordFieldTag, TextFieldTag
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
74 75 76 77 78 79 80 81 |
# File 'lib/clot/no_model_form_tags.rb', line 74 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
83 84 85 86 87 88 89 |
# File 'lib/clot/no_model_form_tags.rb', line 83 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 |