美文网首页
Ruby ActiveRecord 回调

Ruby ActiveRecord 回调

作者: ifree321 | 来源:发表于2019-11-02 22:21 被阅读0次

    https://guides.rubyonrails.org/active_record_callbacks.html#available-callbacks

    3.1 Creating an Object

    • before_validation
    • after_validation
    • before_save
    • around_save
    • before_create
    • around_create
    • after_create
    • after_save
    • after_commit/after_rollback

    3.2 Updating an Object

    • before_validation
    • after_validation
    • before_save
    • around_save
    • before_update
    • around_update
    • after_update
    • after_save
    • after_commit/after_rollback

    3.3 Destroying an Object

    • before_destroy
    • around_destroy
    • after_destroy
    • after_commit/after_rollback

    相关文章

      网友评论

          本文标题:Ruby ActiveRecord 回调

          本文链接:https://www.haomeiwen.com/subject/khnhbctx.html