Rails Rails 5 系列文章

juanito · May 18, 2016 · Last by hww replied at May 19, 2016 · 2589 hits

技能 Get: Rails 5 added new aliases

class User < ApplicationRecord
  after_create_commit   :send_welcome_mail
  after_update_commit   :send_profile_update_notification
  after_destroy_commit  :remove_profile_data

  def send_welcome_mail
    EmailSender.send_welcome_mail(email: email)
  end
end

印度团队~

论坛之前也有一篇文章推荐 推荐一个 Rails 5 Tips 的博客

huacnlee in [Topic was deleted] mention this topic. 08 Jul 11:07
You need to Sign in before reply, if you don't have an account, please Sign up first.