Commit 69723d20 authored by Robert Speicher's avatar Robert Speicher

Devise 3.5.x deprecates `confirm!` in favor of `confirm`

parent ce8f78a5
...@@ -56,7 +56,7 @@ class Admin::UsersController < Admin::ApplicationController ...@@ -56,7 +56,7 @@ class Admin::UsersController < Admin::ApplicationController
end end
def confirm def confirm
if user.confirm! if user.confirm
redirect_to :back, notice: "Successfully confirmed" redirect_to :back, notice: "Successfully confirmed"
else else
redirect_to :back, alert: "Error occurred. User was not confirmed" redirect_to :back, alert: "Error occurred. User was not confirmed"
......
...@@ -19,7 +19,7 @@ admin = User.create( ...@@ -19,7 +19,7 @@ admin = User.create(
admin.projects_limit = 10000 admin.projects_limit = 10000
admin.admin = true admin.admin = true
admin.save! admin.save!
admin.confirm! admin.confirm
if admin.valid? if admin.valid?
puts %Q[ puts %Q[
......
...@@ -712,7 +712,7 @@ describe Notify do ...@@ -712,7 +712,7 @@ describe Notify do
before do before do
user.update_attribute(:email, "user@company.com") user.update_attribute(:email, "user@company.com")
user.confirm! user.confirm
end end
it "is sent from the committer email" do it "is sent from the committer email" do
...@@ -730,7 +730,7 @@ describe Notify do ...@@ -730,7 +730,7 @@ describe Notify do
before do before do
user.update_attribute(:email, "user@something.company.com") user.update_attribute(:email, "user@something.company.com")
user.confirm! user.confirm
end end
it "is sent from the default email" do it "is sent from the default email" do
...@@ -748,7 +748,7 @@ describe Notify do ...@@ -748,7 +748,7 @@ describe Notify do
before do before do
user.update_attribute(:email, "user@mpany.com") user.update_attribute(:email, "user@mpany.com")
user.confirm! user.confirm
end end
it "is sent from the default email" do it "is sent from the default email" do
......
...@@ -188,7 +188,7 @@ describe User do ...@@ -188,7 +188,7 @@ describe User do
end end
it 'confirms a user' do it 'confirms a user' do
user.confirm! user.confirm
expect(user.confirmed?).to be_truthy expect(user.confirmed?).to be_truthy
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment