I am trying to display the filename of a Carrierwave attachment in a Rails erb template. The following does not work:
<%= @page.form.filename %>
You're right @epylinkn. Documentation points towards using:
@page.form.file.identifier
But when I use that, I always get nil (just as @Cheng commented).
nil
I then inspected my objects methods (@page.form.file.methods.inspect), and found the following to work:
@page.form.file.methods.inspect
@page.form.file_identifier