Class: Clot::LabelTag

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

Direct Known Subclasses

Label

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



200
201
202
203
204
205
# File 'lib/clot/no_model_form_tags.rb', line 200

def personal_attributes(name,value)
  case name
    when 'value' then
      @id_string << "_#{value}"
  end
end

#render_stringObject



195
196
197
198
# File 'lib/clot/no_model_form_tags.rb', line 195

def render_string
  @value_string ||= @name_string.humanize
  %{<label #{@class_string}for="#{@id_string}">#{@value_string}</label>}
end