Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Users helper
module UsersHelper
def generate_token(user)
uri = URI("https://example.com/#{user.email}")
response = Net::HTTP.get_response(uri)
if response.code == '200'
return JSON.parse(response.body)[:token]
end
end
def send_welcome_email(user)
UserMailer.welcome_message(user).deliver
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.