mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
Fix failing spec due to missing variable in extracted method
This commit is contained in:
parent
26c090439d
commit
622ffddbb8
1 changed files with 3 additions and 3 deletions
|
@ -426,7 +426,7 @@ class Topic < ActiveRecord::Base
|
|||
invite = Invite.create(invited_by: invited_by, email: lower_email)
|
||||
unless invite.valid?
|
||||
|
||||
grant_permission_to_user if email_already_exists_for?(invite)
|
||||
grant_permission_to_user(lower_email) if email_already_exists_for?(invite)
|
||||
|
||||
return
|
||||
end
|
||||
|
@ -444,8 +444,8 @@ class Topic < ActiveRecord::Base
|
|||
invite.email_already_exists and private_message?
|
||||
end
|
||||
|
||||
def grant_permission_to_user
|
||||
User.where(email: lower_email).first
|
||||
def grant_permission_to_user(lower_email)
|
||||
user = User.where(email: lower_email).first
|
||||
topic_allowed_users.create!(user_id: user.id)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue