title: Possible oneliner for this Ruby on Rails code
body: <p>I have a file object which is of type Rails ActionDispatch::Http::UploadedFile.</p>
  
  <p>I need to overwrite user assigned filename with a generic name while preserving the extension of the file. This is how I have the code implemented currently. Is there are a way better and elegant way of writing this in Ruby.</p>
  
  <pre><code>extension = File.extname(file_name.original_filename)
  file_name.original_filename = "hello#{extension}"
  </code></pre>