New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove :confirm
in favor of :data => { :confirm => 'Text' }
option
#6614
Conversation
ditto #6613 (comment) |
Updated |
@@ -10,6 +10,5 @@ | |||
|
|||
<p> | |||
<%= link_to 'Destroy Comment', [comment.post, comment], | |||
:confirm => 'Are you sure?', | |||
:method => :delete %> | |||
:method => :delete, :data => { :confirm => 'Are you sure?' } %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is better to maintain the indentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@carlosgaldino mate, can you rebase this from current master (it's not applying cleanly anymore), and fix what @rafaelfranca asked, so we can get this merged? Thanks! |
@carlosantoniodasilva Ok, I'll probably do this today or tomorrow. Well, I'll let you know when it's done. Thanks for the comments. |
@carlosantoniodasilva Updated. Please take a look and let me know if I there's something else to do. |
@carlosgaldino thanks! It looks ok for me to merge, but I have a related questions: if we're removing all docs related to /cc @rafaelfranca |
@carlosantoniodasilva There are some examples like this but do you think it's better to add something like:
It doesn't need to be exactly as I typed above but you get the idea. |
I see the examples, but I'm afraid there's no explanation anymore about what they do, since we're removing the related docs. I'm just unsure about how to approach that. Summoning @vijaydev to help us with the doc related question :) |
We need to add it under the list of options, for eg, here and explain it thus: "This option can be used to add custom data attributes This should be done wherever the |
I updated the comments showing that there's a |
@@ -1152,13 +1152,12 @@ together. | |||
|
|||
Here we're using +link_to+ in a different way. We wrap the | |||
+:action+ and +:id+ attributes in a hash so that we can pass those two keys in | |||
first as one argument, and then the final two keys as another argument. The +:method+ and +:confirm+ | |||
first as one argument, and then the final two keys as another argument.The +:method+ and +:data-confirm+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:data-confirm
is invalid syntax
This applies to the following helpers: `button_to` `button_tag` `image_submit_tag` `link_to` `submit_tag`
Remove `:confirm` in favor of `:data => { :confirm => 'Text' }` option
Just like 683fc4d this removes the :confirm option.
/cc @rafaelfranca
The PR adding the deprecation is #6613