<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>travy</author_name>
  <author_url>https://blog.hatena.ne.jp/travy/</author_url>
  <blog_title>dev.techdrive.top</blog_title>
  <blog_url>https://dev.techdrive.top/</blog_url>
  <categories>
  </categories>
  <description>こんにちは、TECH DRIVEのTedです。 今回は複雑になりがちなViewをスッキリさせることができる強力なテクニックをご紹介します。 ページ単位で部分的に表示を変えたい時や、特定の条件の場合だけ表示したいというようなViewでの複雑な要件に出会うことがあると思います。 そんな時、Viewにif文のような条件式を実装していくと、プロジェクトが進行していく毎にコードの保守性や可読性が落ちやすくなってきます。 今回ご紹介する方法は複雑なViewに対して柔軟な対応ができるようになります。 Viewを整理するテクニックはたくさんあれど、「こういう方法もある」という道具の使い方のご紹介に焦点を置いて…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdev.techdrive.top%2Fentry%2F2019%2F06%2F21%2F182949&quot; title=&quot;Railsのif文で荒れたViewを整理する強力かつ柔軟なテクニック - dev.techdrive.top&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/t/travy/20190607/20190607174521.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-06-21 18:29:49</published>
  <title>Railsのif文で荒れたViewを整理する強力かつ柔軟なテクニック</title>
  <type>rich</type>
  <url>https://dev.techdrive.top/entry/2019/06/21/182949</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
