<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>zhenmi</author_name>
  <author_url>https://blog.hatena.ne.jp/zhenmi/</author_url>
  <blog_title>中国でRuby on Rails</blog_title>
  <blog_url>https://zhenmi.hatenadiary.org/</blog_url>
  <categories>
    <anon>Ruby on Rails</anon>
  </categories>
  <description>とあるECサイト案件で、別サイトの会員のログインを可能にしたいという要件がありました。 ECサイト自体も会員システムがあるので、ログイン手段が2通りあるサイトになります。絵にするとこんな感じです。 技術的ポイントは下記です。 １．ひとつのRailsアプリケーションから複数のDBを参照する ２．同じ名前のModelをひとつのRailsアプリケーションで扱う まずはdatabase.ymlにDBへの接続定義を2つ書きます。/config/database.yml production: adapter: mysql encoding: utf8 reconnect: false database:…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fzhenmi.hatenadiary.org%2Fentry%2F20100110%2F1263116379&quot; title=&quot;複数DBを使用した会員認証方法 - 中国でRuby on Rails&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/z/zhenmi/20100110/20100110171916.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2010-01-10 18:39:39</published>
  <title>複数DBを使用した会員認証方法</title>
  <type>rich</type>
  <url>https://zhenmi.hatenadiary.org/entry/20100110/1263116379</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
