title: How to get file extension from UploadedFile object in Rails?
body: <p>How to get the extension of the file uploaded in rails?
  is there any way other than using regex or sub-string?</p>
  
  <p>something like :</p>
  
  <pre><code>params[:file].extension
  </code></pre>