Compare commits

...

7 Commits

Author SHA1 Message Date
José Valim
6c2f51e35e Release 2.2.2 2013-01-15 21:03:15 +01:00
Lucas Mazza
47db984f52 Apply the changes on 0c4615e33 to the simple_form template too. 2013-01-14 18:53:34 -02:00
José Valim
0c4615e337 Properly check if reconfirmable is available 2013-01-13 09:53:26 +01:00
Carlos Antonio da Silva
85e46f0163 Merge pull request #2211 from nashby/fix-build
uUe click_button for canceling account in integration specs
2013-01-12 03:16:12 -08:00
Vasiliy Ermolovich
9913fde749 use click_button for canceling account in integration specs 2013-01-12 14:12:05 +03:00
José Valim
1f940f61c6 Merge pull request #2210 from steverob/master
Changed link_to to button_to for cancel registration link in edit registration view
2013-01-11 14:25:55 -08:00
Steve Robinson
70e38fe66d Changed link_to to button_to for delete user
It is advisable to use link_to for mostly GET operations. Actions like DESTROY when presented as a link can cause severe vulnerabilities.
Hence using a button is advisable.
2013-01-12 01:53:09 +05:30
5 changed files with 11 additions and 6 deletions

View File

@@ -1,3 +1,8 @@
== 2.2.2
* bug fix
* Fix bug when checking for reconfirmable in templates
== 2.2.1
* bug fix

View File

@@ -6,7 +6,7 @@
<div><%= f.label :email %><br />
<%= f.email_field :email, :autofocus => true %></div>
<% if resource.class.reconfirmable && resource.unconfirmed_email.present? %>
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
<div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
<% end %>
@@ -24,6 +24,6 @@
<h3>Cancel my account</h3>
<p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete %>.</p>
<p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete %>.</p>
<%= link_to "Back", :back %>

View File

@@ -1,3 +1,3 @@
module Devise
VERSION = "2.2.1".freeze
VERSION = "2.2.2".freeze
end

View File

@@ -6,7 +6,7 @@
<div class="form-inputs">
<%= f.input :email, :required => true, :autofocus => true %>
<% if resource.class.reconfirmable && resource.unconfirmed_email.present? %>
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
<p>Currently waiting confirmation for: <%= resource.unconfirmed_email %></p>
<% end %>

View File

@@ -214,7 +214,7 @@ class RegistrationTest < ActionController::IntegrationTest
sign_in_as_user
get edit_user_registration_path
click_link "Cancel my account", :method => :delete
click_button "Cancel my account"
assert_contain "Bye! Your account was successfully cancelled. We hope to see you again soon."
assert User.all.empty?
@@ -344,4 +344,4 @@ class ReconfirmableRegistrationTest < ActionController::IntegrationTest
assert_equal "admin.new@example.com", Admin.first.unconfirmed_email
assert Admin.first.valid_password?('pas123')
end
end
end