Forum: Rails deployment Upload image

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ml M. (Guest)
on 2007-04-17 11:44
My problem is because of the following message :
undefined method `original_filename' for "Arellano.pdf":String

controller :

params[:vestuario][:nombre] =
params[:vestuario][:nombre] =
params[:vestuario][:adjunto]= @params[:vestuario][:nombre].read

view :

<%= error_messages_for "vestuario" %>
<%= start_form_tag({:action =>
'create'},{:enctype=>"multipart/form-data"},{:multipart => true}) %>
<p><label for="vestuario_titulo">Titulo</label><br/>
<%= text_field 'vestuario', 'titulo'  %></p>

<p><label for="vestuario_descripcion">Descripcion</label><br/>
<%= text_area 'vestuario', 'descripcion'  %></p>

<p><label for="vestuario_fecha">Fecha</label><br/>
<%= date_select 'vestuario', 'fecha'  %></p>

<p><label for="vestuario_nombre">Imagen</label><br/>
<%= file_field('vestuario', 'nombre', :size => "70") %></p>
<%= submit_tag "Crear nuevo documento" %>
<%= end_form_tag %>

What would be the problem ?
This topic is locked and can not be replied to.