Class: Clot::TextAreaTag

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

Direct Known Subclasses

TextArea

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



125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/clot/no_model_form_tags.rb', line 125

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



139
140
141
# File 'lib/clot/no_model_form_tags.rb', line 139

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