<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shohu33</author_name>
  <author_url>https://blog.hatena.ne.jp/shohu33/</author_url>
  <blog_title>shohu33's diary</blog_title>
  <blog_url>https://shohu.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>共通ヘッダーなどでログイン状態で表示文字をかえたいときなどに便利です。 方法はdynamicHelpersというメソッドを使います。 ※ほかに方法があれば教えてください！これは、viewをrenderする際に動的な情報を埋め込む事ができます。 共通のテンプレートにrequest情報を渡すときに便利です。以下例ではログインしていたら、true、を返すメソッドを作成してテンプレート側でそのメソッドを使用して、ログインしている場合とログインしていない場合で表示を切り替えています。 以下では req.session.user にログインした際に、user情報を保持しているものとします。 vi app.…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fshohu.hatenablog.com%2Fentry%2F20110103%2F1294074407&quot; title=&quot; node.js + express でログイン状態を判断して、表示する文字を変える - shohu33&amp;#39;s diary&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>2011-01-03 02:06:47</published>
  <title> node.js + express でログイン状態を判断して、表示する文字を変える</title>
  <type>rich</type>
  <url>https://shohu.hatenablog.com/entry/20110103/1294074407</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
