Class: Helpers::Forms::Form

Inherits:
Tag show all
Defined in:
lib/helpers/forms.rb

Overview

Form.new(“/posts/create”) do |form|

form.text_field "post[title]"
form.text_area "post[body]"
form.submit "Create"

end

Direct Known Subclasses

FormFor

Instance Attribute Summary

Attributes inherited from Tag

#content, #indentation

Attributes inherited from SelfCloseTag

#attrs, #name

Instance Method Summary collapse

Methods inherited from Tag

#each, #self_closing_tag, #tag, #to_s

Methods inherited from SelfCloseTag

#[], #[]=, #data, #inspect, #to_s

Constructor Details

#initializeForm

Returns a new instance of Form.



11
12
13
# File 'lib/helpers/forms.rb', line 11

def initialize
  super(:form, Array.new, action)
end