From 9280753950e2901c8f5ae863888539ae83b14051 Mon Sep 17 00:00:00 2001 From: Steven Hancock Date: Thu, 14 Jun 2012 01:41:51 -0700 Subject: [PATCH] Fix deprecation warning, :confirm option on links is deprecated Use `:data => { :confirm => 'text' }` instead. --- app/views/aspects/edit.html.haml | 2 +- app/views/conversations/_show.haml | 2 +- app/views/registrations/edit.html.haml | 2 +- app/views/shared/_add_remove_services.haml | 2 +- app/views/tags/_followed_tags_listings.haml | 2 +- app/views/users/edit.html.haml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/aspects/edit.html.haml b/app/views/aspects/edit.html.haml index 0b5c43b6f..991d5f7ab 100644 --- a/app/views/aspects/edit.html.haml +++ b/app/views/aspects/edit.html.haml @@ -20,7 +20,7 @@ %br .bottom_submit_section .left - = button_to t('delete'), @aspect, :method => "delete", :confirm => t('.confirm_remove_aspect'), :class => 'button delete' + = button_to t('delete'), @aspect, :method => "delete", :data => { :confirm => t('.confirm_remove_aspect') }, :class => 'button delete' - if @aspect.contacts_visible = link_to image_tag('icons/padlock-open.png', :height => 16, :width => 16, :id => "contact_visibility_padlock", :class => 'open', :title => t('.aspect_list_is_visible')), aspect_toggle_contact_visibility_path(@aspect), :method => :put, :remote => true diff --git a/app/views/conversations/_show.haml b/app/views/conversations/_show.haml index 175e65c54..6586340f5 100644 --- a/app/views/conversations/_show.haml +++ b/app/views/conversations/_show.haml @@ -4,7 +4,7 @@ .conversation_participants .right - = link_to(image_tag('deletelabel.png'), conversation_visibility_path(conversation), :method => 'delete', :confirm => "#{t('.delete')}?", :title => t('.delete')) + = link_to(image_tag('deletelabel.png'), conversation_visibility_path(conversation), :method => 'delete', :data => { :confirm => "#{t('.delete')}?" }, :title => t('.delete')) %h3{ :class => direction_for(conversation.subject) } = conversation.subject diff --git a/app/views/registrations/edit.html.haml b/app/views/registrations/edit.html.haml index a71cd97c7..adcdf2468 100644 --- a/app/views/registrations/edit.html.haml +++ b/app/views/registrations/edit.html.haml @@ -24,5 +24,5 @@ = f.submit t('.update') %h3 t('.cancel_my_account') %p - = t('.unhappy') #{link_to t('.cancel_my_account'), registration_path(resource_name), :confirm => t('are_you_sure'), :method => :delete}. + = t('.unhappy') #{link_to t('.cancel_my_account'), registration_path(resource_name), :data => { :confirm => t('are_you_sure') }, :method => :delete}. = link_to t('back'), :back diff --git a/app/views/shared/_add_remove_services.haml b/app/views/shared/_add_remove_services.haml index 0e541c40b..4c3c97577 100644 --- a/app/views/shared/_add_remove_services.haml +++ b/app/views/shared/_add_remove_services.haml @@ -10,7 +10,7 @@ %b= service.provider = t('services.index.logged_in_as') %b= service.nickname - = link_to t('services.index.disconnect'), service_path(service), :confirm => t('services.index.really_disconnect', :service => service.provider), :method => :delete + = link_to t('services.index.disconnect'), service_path(service), :data => { :confirm => t('services.index.really_disconnect', :service => service.provider) }, :method => :delete - else = t('services.index.no_services') diff --git a/app/views/tags/_followed_tags_listings.haml b/app/views/tags/_followed_tags_listings.haml index 86693099b..d61837c18 100644 --- a/app/views/tags/_followed_tags_listings.haml +++ b/app/views/tags/_followed_tags_listings.haml @@ -13,7 +13,7 @@ - for tg in tags %li.unfollow{:id => "tag-following-#{tg.name}"} .unfollow_icon.hidden - = link_to image_tag("icons/monotone_close_exit_delete.png", :height => 16, :title => t('aspects.index.unfollow_tag', :tag => tg.name)), tag_tag_followings_path(:name => tg.name, :remote => true), :confirm => t('are_you_sure'), :method => :delete, :remote => true, :id => "unfollow_" + tg.name + = link_to image_tag("icons/monotone_close_exit_delete.png", :height => 16, :title => t('aspects.index.unfollow_tag', :tag => tg.name)), tag_tag_followings_path(:name => tg.name, :remote => true), :data => { :confirm => t('are_you_sure') }, :method => :delete, :remote => true, :id => "unfollow_" + tg.name = link_to "##{tg.name}", tag_path(:name => tg.name), :class => "tag_selector" %li = form_for TagFollowing.new do |tg| diff --git a/app/views/users/edit.html.haml b/app/views/users/edit.html.haml index 37cd90f0a..390d6fb2f 100644 --- a/app/views/users/edit.html.haml +++ b/app/views/users/edit.html.haml @@ -224,4 +224,4 @@ = f.label :close_account_password, t('.current_password'), :for => :close_account_password = f.password_field :current_password, :id => :close_account_password %p - = f.submit t('.close_account_text'), :confirm => t('are_you_sure_delete_account') + = f.submit t('.close_account_text'), :data => { :confirm => t('are_you_sure_delete_account') }