Class: Clot::Label
- Includes:
- ModelTag
- Defined in:
- lib/clot/model_form_tags.rb
Constant Summary
Constants inherited from ClotTag
Instance Method Summary collapse
Methods included from ModelTag
Methods inherited from LabelTag
#personal_attributes, #render_string
Methods inherited from ClotTag
Methods included from TagHelper
Methods included from AttributeSetter
#personal_attributes, #set_attributes
Constructor Details
This class inherits a constructor from Clot::ClotTag
Instance Method Details
#get_label_for(label) ⇒ Object
80 81 82 |
# File 'lib/clot/model_form_tags.rb', line 80 def get_label_for(label) label.humanize end |
#set_primary_attributes(context) ⇒ Object
84 85 86 87 88 89 90 91 |
# File 'lib/clot/model_form_tags.rb', line 84 def set_primary_attributes(context) super context if @params[0] && ! @params[0].match(/:/) @value_string = resolve_value(@params.shift,context) else @value_string = get_label_for(@attribute_name) end end |