📜  rails form_tag - Ruby 代码示例

📅  最后修改于: 2022-03-11 15:04:45.910000             🧑  作者: Mango

代码示例1
form_tag('/posts')
# => 
form_tag('/posts/1', method: :put) # => ... ... form_tag('/upload', multipart: true) # => <%= form_tag('/posts') do -%>
<%= submit_tag 'Save' %>
<% end -%> # =>
<%= form_tag('/posts', remote: true) %> # =>
form_tag('http://far.away.com/form', authenticity_token: false) # form without authenticity token form_tag('http://far.away.com/form', authenticity_token: "cf50faa3fe97702ca1ae") # form with custom authenticity token