Module: DataMapper::Form::Descriptions
- Defined in:
- lib/dm-forms/mixins/descriptions.rb
Instance Method Summary collapse
- #description_tag(attrs = {}) ⇒ Object
- #self_closing_tag(name, attrs = {}) ⇒ Object
- #tag(name, contents = nil, attrs = {}, &block) ⇒ Object
Instance Method Details
#description_tag(attrs = {}) ⇒ Object
14 15 16 |
# File 'lib/dm-forms/mixins/descriptions.rb', line 14 def description_tag attrs = {} (description = attrs.delete(:description)) ? tag(:span, description, :class => 'description') : '' end |
#self_closing_tag(name, attrs = {}) ⇒ Object
9 10 11 12 |
# File 'lib/dm-forms/mixins/descriptions.rb', line 9 def self_closing_tag name, attrs = {} description = description_tag attrs super + description end |
#tag(name, contents = nil, attrs = {}, &block) ⇒ Object
4 5 6 7 |
# File 'lib/dm-forms/mixins/descriptions.rb', line 4 def tag name, contents = nil, attrs = {}, &block description = description_tag attrs super + description end |