title: Convert rails activerecord to raw sql
body: <p>In php codeigniter FW, I can do it easily by using get_compiled_select() method.</p>
  
  <p>Is there any method that I can convert the query build by active record to raw sql.
  Ex:</p>
  
  <pre><code>User.find_by_name("abc")
  </code></pre>
  
  <p>should return raw query script something like</p>
  
  <pre class="lang-sql prettyprint-override"><code>select * from user where name = "abc"
  </code></pre>