@@ -257,11 +257,20 @@ def link_to(name = nil, options = nil, html_options = nil, &block)
257
257
# <%= button_to "New", action: "new" %>
258
258
# # => "<form method="post" action="/controller/new" class="button_to">
259
259
# # <button type="submit">New</button>
260
+ # # <input name="authenticity_token" type="hidden" value="10f2163b45388899ad4d5ae948988266befcb6c3d1b2451cf657a0c293d605a6"/>
260
261
# # </form>"
261
262
#
262
263
# <%= button_to "New", new_article_path %>
263
264
# # => "<form method="post" action="/articles/new" class="button_to">
264
265
# # <button type="submit">New</button>
266
+ # # <input name="authenticity_token" type="hidden" value="10f2163b45388899ad4d5ae948988266befcb6c3d1b2451cf657a0c293d605a6"/>
267
+ # # </form>"
268
+ #
269
+ # <%= button_to "New", new_article_path, params: { time: Time.now } %>
270
+ # # => "<form method="post" action="/articles/new" class="button_to">
271
+ # # <button type="submit">New</button>
272
+ # # <input name="authenticity_token" type="hidden" value="10f2163b45388899ad4d5ae948988266befcb6c3d1b2451cf657a0c293d605a6"/>
273
+ # # <input type="hidden" name="time" value="2021-04-08 14:06:09 -0500">
265
274
# # </form>"
266
275
#
267
276
# <%= button_to [:make_happy, @user] do %>
@@ -271,21 +280,21 @@ def link_to(name = nil, options = nil, html_options = nil, &block)
271
280
# # <button type="submit">
272
281
# # Make happy <strong><%= @user.name %></strong>
273
282
# # </button>
283
+ # # <input name="authenticity_token" type="hidden" value="10f2163b45388899ad4d5ae948988266befcb6c3d1b2451cf657a0c293d605a6"/>
274
284
# # </form>"
275
285
#
276
286
# <%= button_to "New", { action: "new" }, form_class: "new-thing" %>
277
287
# # => "<form method="post" action="/controller/new" class="new-thing">
278
288
# # <button type="submit">New</button>
289
+ # # <input name="authenticity_token" type="hidden" value="10f2163b45388899ad4d5ae948988266befcb6c3d1b2451cf657a0c293d605a6"/>
279
290
# # </form>"
280
291
#
281
- #
282
292
# <%= button_to "Create", { action: "create" }, remote: true, form: { "data-type" => "json" } %>
283
293
# # => "<form method="post" action="/images/create" class="button_to" data-remote="true" data-type="json">
284
294
# # <button type="submit">Create</button>
285
295
# # <input name="authenticity_token" type="hidden" value="10f2163b45388899ad4d5ae948988266befcb6c3d1b2451cf657a0c293d605a6"/>
286
296
# # </form>"
287
297
#
288
- #
289
298
# <%= button_to "Delete Image", { action: "delete", id: @image.id },
290
299
# method: :delete, data: { confirm: "Are you sure?" } %>
291
300
# # => "<form method="post" action="/images/delete/1" class="button_to">
@@ -294,7 +303,6 @@ def link_to(name = nil, options = nil, html_options = nil, &block)
294
303
# # <input name="authenticity_token" type="hidden" value="10f2163b45388899ad4d5ae948988266befcb6c3d1b2451cf657a0c293d605a6"/>
295
304
# # </form>"
296
305
#
297
- #
298
306
# <%= button_to('Destroy', 'http://www.example.com',
299
307
# method: :delete, remote: true, data: { confirm: 'Are you sure?', disable_with: 'loading...' }) %>
300
308
# # => "<form class='button_to' method='post' action='http://www.example.com' data-remote='true'>
0 commit comments