title: How to share a post in twitter using ruby on rails?
body: <p>I am trying to share a post created in rails which is just a text content. Coding to share that post's title and url using this code </p>
  
  <pre><code>&lt;a onclick="javascript:window.open('https://twitter.com/share?text=&lt;%= @post.title %&gt; by @rockyram6195 - &amp;amp;url=&lt;%= url_for([@post, {only_path: false}]) %&gt;', '_blank', 'width=800, height=500, top=200, left=300');void(0);"&gt;
      &lt;i class="fa fa-twitter"&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>But i don't know what the problem is but when i click it nothing happen .
  any one tell me whats the problem or suggest me some other way of code to share my post's title and comment. </p>