<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>innocent-zero</author_name>
  <author_url>https://blog.hatena.ne.jp/innocent-zero/</author_url>
  <blog_title>ブログ</blog_title>
  <blog_url>https://gouf.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby on Rails</anon>
  </categories>
  <description>(外部API を利用しているコードの) テストコード... の書き方がわからなかったので Pull Request として作成するのはパス でも手を動かしたので記録しておく Q&amp;A サイトでのやり取り (Ruby - RailsアプリをHerokuへデプロイ後、ぐるなびAPIが検索結果を返さない｜teratail) で、ソースコードを公開していることを教えてもらえたので、質問で問題としている部分を見る機会が得られた 今回は コントローラにたくさん書かれていたそのコードを lib/ に移動したよ、というお話 まとめ もとのコード 書き換え後のコード 実際に使う Rails に lib/ を使うこ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fgouf.hatenablog.com%2Fentry%2F2019%2F08%2F05%2F165042&quot; title=&quot;コントローラに書かれた API へのリクエスト処理を lib/ に移行する (リファクタリング) - ブログ&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>2019-08-05 16:50:42</published>
  <title>コントローラに書かれた API へのリクエスト処理を lib/ に移行する (リファクタリング)</title>
  <type>rich</type>
  <url>https://gouf.hatenablog.com/entry/2019/08/05/165042</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
