Remove redundant user method from User Model (#7599)
This commit is contained in:
parent
e77f7854d5
commit
67a1109f6b
1 changed files with 2 additions and 7 deletions
|
|
@ -330,11 +330,11 @@ class User < ApplicationRecord
|
|||
end
|
||||
|
||||
def org_member?(organization)
|
||||
OrganizationMembership.exists?(user: user, organization: organization, type_of_user: %w[admin member])
|
||||
OrganizationMembership.exists?(user: self, organization: organization, type_of_user: %w[admin member])
|
||||
end
|
||||
|
||||
def org_admin?(organization)
|
||||
OrganizationMembership.exists?(user: user, organization: organization, type_of_user: "admin")
|
||||
OrganizationMembership.exists?(user: self, organization: organization, type_of_user: "admin")
|
||||
end
|
||||
|
||||
def block; end
|
||||
|
|
@ -575,11 +575,6 @@ class User < ApplicationRecord
|
|||
errors.add(:mastodon_url, "is not a valid URL")
|
||||
end
|
||||
|
||||
# TODO: @practicaldev/sre: Remove this redundant method
|
||||
def user
|
||||
self
|
||||
end
|
||||
|
||||
def tag_keywords_for_search
|
||||
employer_name.to_s + mostly_work_with.to_s + available_for.to_s
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue