Class: Clot::SelectTag
- Defined in:
- lib/clot/no_model_form_tags.rb
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
171 172 173 174 175 176 177 178 |
# File 'lib/clot/no_model_form_tags.rb', line 171 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
180 181 182 |
# File 'lib/clot/no_model_form_tags.rb', line 180 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 |