submit

submit(value = nil, name = nil)
Instance Public methods

Generate a submit button Input element, as a String.

value is the text to display on the button. name is the name of the input.

Alternatively, the attributes can be specified as a hash.

1
2
3
4
5
6
7
8
9
10
11
submit
  # <INPUT TYPE="submit">
 
submit("ok")
  # <INPUT TYPE="submit" VALUE="ok">
 
submit("ok", "button1")
  # <INPUT TYPE="submit" VALUE="ok" NAME="button1">
 
submit("VALUE" => "ok", "NAME" => "button1", "ID" => "foo")
  # <INPUT TYPE="submit" VALUE="ok" NAME="button1" ID="foo">
doc_ruby_on_rails
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.