Method: Lifeform::Form#verify_method
- Defined in:
- lib/lifeform/form.rb
#verify_method ⇒ Object
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/lifeform/form.rb', line 132 def verify_method return if %w[get post].include?(parameters[:method].to_s.downcase) @method_tag = Class.new(Phlex::HTML) do # TODO: break this out into a real component def initialize(method:) @method = method end def template input type: "hidden", name: "_method", value: @method, autocomplete: "off" end end.new(method: @parameters[:method].to_s.downcase) parameters[:method] = :post end |