Forum: Rails deployment Upload image

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ea2db5b8151b4e9e6aa8c7d54d64e6fa?d=identicon&s=25 Ml Ml (mluired)
on 2007-04-17 09:44
My problem is because of the following message :
undefined method `original_filename' for "Arellano.pdf":String

controller :

params[:vestuario][:nombre] =
sanitize_filename(params[:vestuario][:nombre])
params[:vestuario][:nombre] =
@params[:vestuario][:nombre].original_filename
params[:vestuario][:adjunto]= @params[:vestuario][:nombre].read

view :

<%= error_messages_for "vestuario" %>
<%= start_form_tag({:action =>
'create'},{:enctype=>"multipart/form-data"},{:multipart => true}) %>
<!--[form:vestuario]-->
<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>
<p>
<%= submit_tag "Crear nuevo documento" %>
<%= end_form_tag %>

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