Class: Helpers::Forms::ButtonTo
- Inherits:
-
Tag
- Object
- SelfCloseTag
- Tag
- Helpers::Forms::ButtonTo
- Defined in:
- lib/helpers/forms.rb
Overview
ButtonToDelete.new(post_path(@post), confirm: “Are you sure?”)
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Tag
Attributes inherited from SelfCloseTag
Instance Method Summary collapse
-
#initialize(title, action, attrs = Hash.new, &block) ⇒ ButtonTo
constructor
A new instance of ButtonTo.
Methods inherited from Tag
#each, #self_closing_tag, #tag, #to_s
Methods inherited from SelfCloseTag
#[], #[]=, #data, #inspect, #to_s
Constructor Details
#initialize(title, action, attrs = Hash.new, &block) ⇒ ButtonTo
Returns a new instance of ButtonTo.
28 29 30 31 |
# File 'lib/helpers/forms.rb', line 28 def initialize(title, action, attrs = Hash.new, &block) = Tag.new(:button, title, attrs.merge(type: "submit")) super(:form, , action: action, &block) end |