<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>angelbeatsviolin</author_name>
  <author_url>https://blog.hatena.ne.jp/angelbeatsviolin/</author_url>
  <blog_title>sontixyou blog</blog_title>
  <blog_url>https://angelbeatsviolin.hatenablog.com/</blog_url>
  <categories>
    <anon>Rails</anon>
  </categories>
  <description>背景 記事のタイトルを保存するtitleカラムがあるとします。このtitleカラムは、記事一覧ページでtitleの並び替え機能があるとします。 あるとき、Railsで文字列を保存するtitleカラムを暗号化しようと話題が出ました。 カラムの暗号化 Railsには、2種類の暗号化が用意されています。 決定論的暗号化 同じコンテンツを同じパスワードで暗号化しても、暗号化のたびに同じ暗号文が生成される 非決定論的暗号化 Active Record と暗号化 - Railsガイド カラムを並び替えしたい 以下のレコードをencrypted_titleカラムを指定して、並び替えしたいとします。 mysq…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fangelbeatsviolin.hatenablog.com%2Fentry%2F2024%2F03%2F09%2F085827&quot; title=&quot;Active Recordのカラムの暗号化でソートできずにハマった - sontixyou blog&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2024-03-09 08:58:27</published>
  <title>Active Recordのカラムの暗号化でソートできずにハマった</title>
  <type>rich</type>
  <url>https://angelbeatsviolin.hatenablog.com/entry/2024/03/09/085827</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
