title: Is String.sanitize, the best way to protect from SQL injection in rails or sinatra apps
body: <p>Is string.sanitize the best way to protect from sql injection.</p>
  
  <p>Do we need to install the Sanitize gem for it
  or is there a better way?</p>
  
  <pre><code>value = "O'Brian"
  value.sanitize =&gt;"O\'Brian"
  or 
  value.escape =&gt;"O\'Brian"
  </code></pre>
  
  <p>It s probably included by default in Rails 5 , but what about using sinatra.</p>