<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kic-yuuki</author_name>
  <author_url>https://blog.hatena.ne.jp/kic-yuuki/</author_url>
  <blog_title>ざきの学習帳 </blog_title>
  <blog_url>https://kic-yuuki.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby</anon>
    <anon>Rails</anon>
    <anon>プログラミング</anon>
  </categories>
  <description>Userモデルみたいなクラスがあって、 first_name（姓） last_name（名） のようなカラムがあった場合、以下のようにfirst_nameとlast_nameを組み合わせて、full_nameという、Viewやレスポンス用のメソッドを実装するシーンがあるかと思います。 class User &lt; ApplicationRecord def full_name first_name + last_name end end # 使用例（View側） @user.full_name ただ、このような実装はシステム拡大につれて多くなり、モデルのコードが冗長になるかと思います。 それを解消…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkic-yuuki.hatenablog.com%2Fentry%2F2019%2F07%2F07%2F164550&quot; title=&quot;【Ruby on Rails】Gem「ActiveDecorator」の紹介 View向けのメソッドを定義する - ざきの学習帳 &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/k/kic-yuuki/20190707/20190707164341.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-07-07 16:45:50</published>
  <title>【Ruby on Rails】Gem「ActiveDecorator」の紹介 View向けのメソッドを定義する</title>
  <type>rich</type>
  <url>https://kic-yuuki.hatenablog.com/entry/2019/07/07/164550</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
