From http://api.rubyonrails.org
Syntax: file_field(object_name, method, options = {})
You should be doing file_field :show, :upload to parameterize it
within the ''show'' object.
Also, just use <%form_for @show, do |f| %> ... <% end %> instead of
qualifying each tag. You can then use f.text_field :mobile_name,
f.field_field :upload ,etc.
On Jul 4, 5:36 pm, Jai Jai
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:> i ve form like
>
> <% form_tag ''create'', :multipart => true do %>
> <p><label for="show_title">Title</label>:
> <%=text_field
''show'',''title''%></p>
> <p><label for="book_mobile_name">Mobile
Type</label>:
> <%=text_field
''show'',''mobilename''%></p>
> <p><label for="book_price">Price</label>:
> <%=text_field ''show'',''price''%>
> </p>
> <p><label
for="book_description">Description</label>:
> <%=text_field
''show'',''description''%></p>
> <p><label for="book_file">Image</label>:
> <%= file_field ''upload'',''filename''
%>
> </p>
> <%= submit_tag "Send Attachment" %>
> <% end %>
>
> in my controller
>
> def create
> @show =Show.new(params[:show])
> ..
> i need to split params[:show] values or pls help me how to upload this
> file...
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---