Class: Clot::SelectTag
- Defined in:
- lib/clot/no_model_form_tags.rb
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
178 179 180 181 182 183 184 185 |
# File 'lib/clot/no_model_form_tags.rb', line 178 def personal_attributes(name,value) case name when 'multiple' then @multiple_string = %{multiple="#{value == "true" ? "multiple" : ""}" } when 'prompt' then @prompt_option = %{<option value="">#{value}</option>} end end |
#render_string ⇒ Object
187 188 189 |
# File 'lib/clot/no_model_form_tags.rb', line 187 def render_string %{<select #{@disabled_string}#{@class_string}id="#{@id_string}" #{@multiple_string}name="#{@name_string}#{unless @multiple_string.nil? then '[]' end}">#{@prompt_option}#{@value_string}</select>} end |