Skip to content

Instantly share code, notes, and snippets.

@3014zhangshuo
Created February 17, 2017 07:15
Show Gist options
  • Save 3014zhangshuo/262d3df9fd6971886cb4dc9006340b50 to your computer and use it in GitHub Desktop.
Save 3014zhangshuo/262d3df9fd6971886cb4dc9006340b50 to your computer and use it in GitHub Desktop.
application_controllers
def update_user_first_resume_name_resume
if current_user.present? && current_user.resumes.last.present?
resume = current_user.resumes.last
a = resume.resume_user_first_name
b = resume.resume_user_last_name
params[:name] = a += b
resume.name_resume = params[:name]
resume.save!
end
end
def sent_confirm_email
if current_user.present? && current_user.confirmation_token.nil?
Devise::Mailer.confirmation_instructions(current_user).deliver
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment