title: Displaying a Carrierwave filename in the view
body: <p>I am trying to display the filename of a Carrierwave attachment in a Rails erb template. The following does not work:</p>
  
  <pre><code>&lt;%= @page.form.filename %&gt;
  </code></pre>
  
  <p>This seems in line with <a href="http://rubydoc.info/gems/carrierwave/0.5.2/CarrierWave/SanitizedFile#filename-instance_method" rel="noreferrer">the documentation</a>. Is some additional step needed?</p>
  
  <p>My page model looks like this:</p>
  
  <pre><code>class Page &lt; ActiveRecord::Base
  
    mount_uploader :form, FormUploader
  
  end
  </code></pre>
  
  <p>The form uploader looks like this:</p>
  
  <pre><code>class FormUploader &lt; CarrierWave::Uploader::Base
  
    storage :file
  
    def store_dir
      "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
    end
  
    def extension_white_list
      %w(pdf)
    end
  
  end
  </code></pre>