title: Oembed tweet - twitter gem
body: <p>This is probably a terribly simple question but i can't figure out how to render an embedded tweet.</p>
  
  <p>For simplicity, this is my controller:</p>
  
  <pre><code>class TweetsController &lt; ApplicationController
  
    def index
  
    @tweet = twitter_client.oembed('527501479142109184')
  
    end
  
  end
  </code></pre>
  
  <p>And in the view if i just do the following it displays the object only:</p>
  
  <pre><code>&lt;%= @tweet %&gt;
  </code></pre>
  
  <p>i.e. <code>#&lt;Twitter::OEmbed:0x007fb878abc5d8&gt;</code></p>
  
  <p>On inspection this gives: </p>
  
  <pre><code>#&lt;Twitter::OEmbed:0x007fb875cacd28 @attrs={:cache_age=&gt;"3153600000", :url=&gt;"https://twitter.com/HuayuanSong/statuses/527501479142109184", :height=&gt;nil, :provider_url=&gt;"https://twitter.com", :provider_name=&gt;"Twitter", :author_name=&gt;"Huayuan Song", :version=&gt;"1.0", :author_url=&gt;"https://twitter.com/HuayuanSong", :type=&gt;"rich", :html=&gt;"&lt;blockquote class=\"twitter-tweet\"&gt;&lt;p&gt;Jeg kunne lide en video på &lt;a href=\"https://twitter.com/YouTube\"&gt;@YouTube&lt;/a&gt; &lt;a href=\"http://t.co/hhhTvyJA6y\"&gt;http://t.co/hhhTvyJA6y&lt;/a&gt; Obama: U.S. leading the way against Ebola spread&lt;/p&gt;&amp;mdash; Huayuan Song (@HuayuanSong) &lt;a href=\"https://twitter.com/HuayuanSong/status/527501479142109184\"&gt;October 29, 2014&lt;/a&gt;&lt;/blockquote&gt;\n&lt;script async src=\"//platform.twitter.com/widgets.js\" charset=\"utf-8\"&gt;&lt;/script&gt;", :width=&gt;550}&gt;
  </code></pre>
  
  <p>Obviously, this is terribly simple and i'm just using this a proof of concept type thing. Can somebody explain how i go from having the object to being able to display the actual embedded tweet?</p>
  
  <p>thanks</p>