Class: Clot::TextAreaTag

Inherits:
ClotTag
  • Object
show all
Defined in:
lib/clot/no_model_form_tags.rb

Direct Known Subclasses

TextArea

Constant Summary

Constants inherited from ClotTag

ClotTag::Syntax

Instance Method Summary collapse

Methods inherited from ClotTag

#initialize, #render

Methods included from TagHelper

#resolve_value, #split_params

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



132
133
134
135
136
137
138
139
140
141
142
143
144
# File 'lib/clot/no_model_form_tags.rb', line 132

def personal_attributes(name,value)

  case name
    when "cols" then
      @col_string = %{cols="#{value}" }
    when "rows" then
      @row_string = %{ rows="#{value}"}
    when "size" then
      size_array = value.split /x/
      @col_string = %{cols="#{size_array[0]}" }
      @row_string = %{ rows="#{size_array[1]}"}
  end
end

#render_stringObject



146
147
148
# File 'lib/clot/no_model_form_tags.rb', line 146

def render_string
  %{<textarea #{@disabled_string}#{@class_string}#{@col_string}id="#{@id_string}" name="#{@name_string}"#{@row_string}>#{@value_string}</textarea>}
end