assign_attributesメソッドとupdate_attributesメソッド

[assign_attributes]メソッドと[update_attributes]メソッドについて

[assign_attributes]メソッドは、インスタンスの値を変更するがDBには保存しないカラム
下の検証で動きがイメージできると思います

    34:   def update
    35:     authorize(@article)
    36: binding.pry
 => 37:     @article.assign_attributes(article_params)
    38:     @article.adjust_state
    39:     if @article.save
    40:       flash[:notice] = '更新しました'
    41:       redirect_to edit_admin_article_path(@article.uuid)
    42:     else
    43:       render :edit
    44:     end
    45:   end

[1] pry(#<Admin::ArticlesController>)> params
=> <ActionController::Parameters {"utf8"=>"✓", "_method"=>"patch", "authenticity_token"=>"btXfh3A15KmXwkSfuFEK4JY6SkGP2KHfcRQ/os11ZNEPGOpScDMIfhK+zc2HprmBRlcM+22a4vuUP8L+pZ4Peg==", "article"=>{"state"=>"publish_wait", "published_at"=>"2021-08-25 15:38", "title"=>"rails", "slug"=>"bbbbbb", "description"=>"", "author_id"=>"", "category_id"=>"6", "tag_ids"=>[""]}, "commit"=>"更新する", "controller"=>"admin/articles", "action"=>"update", "uuid"=>"8aa43d78-ccc8-46f3-a325-19fee7775109"} permitted: false>
[2] pry(#<Admin::ArticlesController>)> params[:article]
=> <ActionController::Parameters {"state"=>"publish_wait", "published_at"=>"2021-08-25 15:38", "title"=>"rails", "slug"=>"bbbbbb", "description"=>"", "author_id"=>"", "category_id"=>"6", "tag_ids"=>[""]} permitted: false>
[3] pry(#<Admin::ArticlesController>)> @article
=> #<Article:0x00007f9cb12a2128
 id: 20,
 category_id: 6,
 author_id: nil,
 uuid: "8aa43d78-ccc8-46f3-a325-19fee7775109",
 slug: "aaaaaaa",
 title: "テスト1",
 description: "",
 body: "",
 state: "publish_wait",
 published_at: Wed, 25 Aug 2021 15:38:00 JST +09:00,
 created_at: Thu, 05 Aug 2021 15:34:37 JST +09:00,
 updated_at: Fri, 06 Aug 2021 00:07:08 JST +09:00,
 deleted_at: nil>
[4] pry(#<Admin::ArticlesController>)> @article.assign_attributes(article_params)
  Tag Load (1.1ms)  SELECT "taxonomies".* FROM "taxonomies" WHERE "taxonomies"."type" IN ('Tag') AND 1=0
  Tag Load (0.2ms)  SELECT "taxonomies".* FROM "taxonomies" INNER JOIN "article_tags" ON "taxonomies"."id" = "article_tags"."tag_id" WHERE "taxonomies"."type" IN ('Tag') AND "article_tags"."article_id" = ?  [["article_id", 20]]
=> nil
[5] pry(#<Admin::ArticlesController>)> @article
=> #<Article:0x00007f9cb12a2128
 id: 20,
 category_id: 6,
 author_id: nil,
 uuid: "8aa43d78-ccc8-46f3-a325-19fee7775109",
 slug: "bbbbbb",
 title: "rails",
 description: "",
 body: "",
 state: "publish_wait",
 published_at: Wed, 25 Aug 2021 15:38:00 JST +09:00,
 created_at: Thu, 05 Aug 2021 15:34:37 JST +09:00,
 updated_at: Fri, 06 Aug 2021 00:07:08 JST +09:00,
 deleted_at: nil>

[update_attributes]メソッドは、インスタンスの値を変更しDBに保存するカラム
下の検証で動きがイメージできると思います

    34:   def update
    35:     authorize(@article)
    36: binding.pry
 => 37:     @article.update_attributes(article_params)
    38:     @article.adjust_state
    39:     if @article.save
    40:       flash[:notice] = '更新しました'
    41:       redirect_to edit_admin_article_path(@article.uuid)
    42:     else
    43:       render :edit
    44:     end
    45:   end

[1] pry(#<Admin::ArticlesController>)> params
=> <ActionController::Parameters {"utf8"=>"✓", "_method"=>"patch", "authenticity_token"=>"X17ETWm45P68UbKdS3oT33ChaMGZh2Car2TF6YD9p0E+k/GYab4IKTktO890jaC+oMwue3vFI75KTzi16BbM6g==", "article"=>{"state"=>"publish_wait", "published_at"=>"2021-08-25 15:38", "title"=>"rails", "slug"=>"bbbbbb", "description"=>"", "author_id"=>"", "category_id"=>"6", "tag_ids"=>[""]}, "commit"=>"更新する", "controller"=>"admin/articles", "action"=>"update", "uuid"=>"8aa43d78-ccc8-46f3-a325-19fee7775109"} permitted: false>
[2] pry(#<Admin::ArticlesController>)> params[:article]
=> <ActionController::Parameters {"state"=>"publish_wait", "published_at"=>"2021-08-25 15:38", "title"=>"rails", "slug"=>"bbbbbb", "description"=>"", "author_id"=>"", "category_id"=>"6", "tag_ids"=>[""]} permitted: false>
[3] pry(#<Admin::ArticlesController>)> @article
=> #<Article:0x00007f9cb1d91de0
 id: 20,
 category_id: 6,
 author_id: nil,
 uuid: "8aa43d78-ccc8-46f3-a325-19fee7775109",
 slug: "aaaaaaa",
 title: "テスト1",
 description: "",
 body: "",
 state: "publish_wait",
 published_at: Wed, 25 Aug 2021 15:38:00 JST +09:00,
 created_at: Thu, 05 Aug 2021 15:34:37 JST +09:00,
 updated_at: Tue, 10 Aug 2021 16:37:30 JST +09:00,
 deleted_at: nil>
[4] pry(#<Admin::ArticlesController>)> @article.update_attributes(article_params) 
   (0.1ms)  begin transaction
  Tag Load (0.2ms)  SELECT "taxonomies".* FROM "taxonomies" WHERE "taxonomies"."type" IN ('Tag') AND 1=0
  Tag Load (0.1ms)  SELECT "taxonomies".* FROM "taxonomies" INNER JOIN "article_tags" ON "taxonomies"."id" = "article_tags"."tag_id" WHERE "taxonomies"."type" IN ('Tag') AND "article_tags"."article_id" = ?  [["article_id", 20]]
  Article Exists (0.3ms)  SELECT  1 AS one FROM "articles" WHERE "articles"."slug" = ? AND "articles"."id" != ? LIMIT ?  [["slug", "bbbbbb"], ["id", 20], ["LIMIT", 1]]
  Article Exists (0.2ms)  SELECT  1 AS one FROM "articles" WHERE "articles"."title" = ? AND "articles"."id" != ? LIMIT ?  [["title", "rails"], ["id", 20], ["LIMIT", 1]]
  ActiveStorage::Attachment Load (0.1ms)  SELECT  "active_storage_attachments".* FROM "active_storage_attachments" WHERE "active_storage_attachments"."record_id" = ? AND "active_storage_attachments"."record_type" = ? AND "active_storage_attachments"."name" = ? LIMIT ?  [["record_id", 20], ["record_type", "Article"], ["name", "eye_catch"], ["LIMIT", 1]]
  Article Update (0.4ms)  UPDATE "articles" SET "slug" = ?, "title" = ?, "updated_at" = ? WHERE "articles"."id" = ?  [["slug", "bbbbbb"], ["title", "rails"], ["updated_at", "2021-08-10 16:38:58.446024"], ["id", 20]]
   (1.3ms)  commit transaction
=> true
[5] pry(#<Admin::ArticlesController>)> @article
=> #<Article:0x00007f9cb1d91de0
 id: 20,
 category_id: 6,
 author_id: nil,
 uuid: "8aa43d78-ccc8-46f3-a325-19fee7775109",
 slug: "bbbbbb",
 title: "rails",
 description: "",
 body: "",
 state: "publish_wait",
 published_at: Wed, 25 Aug 2021 15:38:00 JST +09:00,
 created_at: Thu, 05 Aug 2021 15:34:37 JST +09:00,
 updated_at: Tue, 10 Aug 2021 16:38:58 JST +09:00,
 deleted_at: nil>

参考記事:

update_attibutesとassign_attributes違い - Qiita