<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>karlley_jp</author_name>
  <author_url>https://blog.hatena.ne.jp/karlley_jp/</author_url>
  <blog_title>時々とおまわり</blog_title>
  <blog_url>https://karlley.hatenablog.jp/</blog_url>
  <categories>
    <anon>Rails</anon>
    <anon>Tips</anon>
    <anon>Gem</anon>
  </categories>
  <description>i18nでモデル名やカラム名を参照するhuman系メソッドはモデルからしか呼び出せないと思っていましたが、インスタンスからも呼び出せるようです。 human系メソッドとは？ i18nでActiveRecordのモデル名、カラム名を参照するメソッド。メソッド名が長いので勝手にhuman系と呼びました。 次のような形で翻訳情報を参照することができます。 モデル名: Model.model_name.human カラム名: Model.human_attribute_name(attribute) Rails 国際化（i18n）API - Railsガイド i18nで多言語化する - karlley…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkarlley.hatenablog.jp%2Fentry%2F2022%2F08%2F15%2F053856&quot; title=&quot;i18nのhuman系メソッドはモデルだけでなくインスタンスからも呼び出せる - 時々とおまわり&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>2022-08-15 05:38:56</published>
  <title>i18nのhuman系メソッドはモデルだけでなくインスタンスからも呼び出せる</title>
  <type>rich</type>
  <url>https://karlley.hatenablog.jp/entry/2022/08/15/053856</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
