module Padrino::Helpers::FormHelpers
def hidden_form_method_field(desired_method)
'put' and 'delete' are just specified using hidden fields with form action still 'put'.
Only 'get' and 'post' are allowed within browsers;
returns the hidden method field for 'put' and 'delete' forms
def hidden_form_method_field(desired_method) return '' if (desired_method.to_s =~ /get|post/) original_method = desired_method.to_s.dup desired_method.to_s.replace('post') hidden_field_tag(:_method, :value => original_method) end