Last active
May 13, 2020 16:34
-
-
Save staycreativedesign/20a369fd47e18a35e6256e975f984d3a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def find_emails_from_extra(search_term, name ) | |
emails = [] | |
emails << User.where(search_term: name).pluck(:email) | |
emails | |
end | |
how can I change the search_term: into whatever the attribute is? | |
so if I do | |
find_email_from_extra(employer_state, "FL") | |
#becomes | |
emails << User.where(employer_state: "FL").pluck(:email) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment