<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mah666hhh</author_name>
  <author_url>https://blog.hatena.ne.jp/mah666hhh/</author_url>
  <blog_title>スリ飯屋MaLankaのフリーエンジニアな日々</blog_title>
  <blog_url>https://www.malanka.org/</blog_url>
  <categories>
    <anon>技術関連</anon>
    <anon>技術関連 - Rails</anon>
    <anon>技術関連 - ActiveAdmin</anon>
  </categories>
  <description>controller do〜endブロックの中で、 createなりupdateメソッドをオーバーライドすればOKです。 オーバーライドする際は、 リダイレクトの処理も書いてあげる必要があります。 ちなみに、 createもupdateも、 デフォルトのリダイレクト先は「showアクションのURL」です。 もしリダイレクトの挙動を変えたくない場合は、 ActiveAdminで生成されるshowのルーティングを指定すればOK。 例 def create # TODO: 代入処理などする if user.save! redirect_to user_url(user), flash: { notice: '更新しました' } end end また、 オーバーライドする場合は、 エラーの際の処理も追加してあげないと、 renderなりredirectせず、 画面が切り替わらない(204 no_contentになる)ので注意です。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.malanka.org%2Fentry%2FCustomizing-the-default-create-and-update-process-_in-ActiveAdmin&quot; title=&quot;【ActiveAdmin】デフォルトのcreateとupdateの処理をカスタマイズしたい - スリ飯屋MaLankaのフリーエンジニアな日々&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/m/mah666hhh/20201108/20201108185116.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-11-08 18:52:33</published>
  <title>【ActiveAdmin】デフォルトのcreateとupdateの処理をカスタマイズしたい</title>
  <type>rich</type>
  <url>https://www.malanka.org/entry/Customizing-the-default-create-and-update-process-_in-ActiveAdmin</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
