form

form(method = "post", action = script_name, enctype = "application/x-www-form-urlencoded")
Instance Public methods

Generate a Form element as a string.

method should be either âgetâ or âpostâ, and defaults to the latter. action defaults to the current CGI script name. enctype defaults to âapplication/x-www-form-urlencodedâ.

Alternatively, the attributes can be specified as a hash.

See also multipart_form() for forms that include file uploads.

form{ "string" }
  # <FORM METHOD="post" ENCTYPE="application/x-www-form-urlencoded">string</FORM>

form("get") { "string" }
  # <FORM METHOD="get" ENCTYPE="application/x-www-form-urlencoded">string</FORM>

form("get", "url") { "string" }
  # <FORM METHOD="get" ACTION="url" ENCTYPE="application/x-www-form-urlencoded">string</FORM>

form("METHOD" => "post", "ENCTYPE" => "enctype") { "string" }
  # <FORM METHOD="post" ENCTYPE="enctype">string</FORM>
doc_ruby_on_rails
2015-03-31 21:36:42
Comments
Leave a Comment

Please login to continue.