class Form

todo: make more like github.com/justinfrench/formtastic

Public Instance Methods

content() click to toggle source
# File lib/erector/widgets/form.rb, line 6
def content
  form :method => form_method, :action => @action do
    unless rest_method == form_method
      input :type => "hidden", :name => "_method", :value => rest_method
    end
    super
  end
end
form_method() click to toggle source
# File lib/erector/widgets/form.rb, line 19
def form_method
  if method == "get"
    "get"
  else
    "post"
  end
end
method() click to toggle source
# File lib/erector/widgets/form.rb, line 15
def method
  @method.to_s.downcase
end
rest_method() click to toggle source
# File lib/erector/widgets/form.rb, line 27
def rest_method
  method
end