<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shinkufencer</author_name>
  <author_url>https://blog.hatena.ne.jp/shinkufencer/</author_url>
  <blog_title>コード日進月歩</blog_title>
  <blog_url>https://shinkufencer.hateblo.jp/</blog_url>
  <categories>
    <anon>Ruby</anon>
    <anon>Rails</anon>
    <anon>Tips</anon>
  </categories>
  <description>POROとか作ってると、Rails関係のクラスを継承していないとか往々に起きるんですが、そういうところで引数にホストとか指定せずにURL作りたいなーということがあったのでメモ。 環境 rails (5.2.0) やり方 全部を引数指定するpolymorphic_url Rails.application.routes.url_helpers.polymorphic_url(User.last.avatar,host:&quot;example.com&quot;,protocol:&quot;http&quot;) # =&gt; &quot;http://example.com/rails/active_storage/blobs/eyJfcmF…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fshinkufencer.hateblo.jp%2Fentry%2F2018%2F07%2F25%2F230537&quot; title=&quot;Railsと関係ないところでActiveStorageのURLを生成する - コード日進月歩&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>2018-07-25 23:05:37</published>
  <title>Railsと関係ないところでActiveStorageのURLを生成する</title>
  <type>rich</type>
  <url>https://shinkufencer.hateblo.jp/entry/2018/07/25/230537</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
