Wrap user confirm method with writing role
This commit is contained in:
parent
88d8bd2816
commit
9666472105
|
@ -123,6 +123,7 @@ class User < ApplicationRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
def confirm
|
def confirm
|
||||||
|
ActiveRecord::Base.connected_to(role: :writing) do
|
||||||
new_user = !confirmed?
|
new_user = !confirmed?
|
||||||
self.approved = true if open_registrations?
|
self.approved = true if open_registrations?
|
||||||
|
|
||||||
|
@ -132,6 +133,7 @@ class User < ApplicationRecord
|
||||||
# prepare_new_user!
|
# prepare_new_user!
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def confirm!
|
def confirm!
|
||||||
new_user = !confirmed?
|
new_user = !confirmed?
|
||||||
|
|
Loading…
Reference in New Issue