Hi, I'm puzzled by the next.
I have messages that have attachments.
I have an index action for the attachments where I list all the
attachments that a message has. From the same index page I can also add
new attachments to that message.
For that I've been using the next form
<% form_for(@message.attachments.build, :html => { :multipart => true })
do |f| %>
<%= hidden_field_tag 'mess', @message.id %>
<p>Attachment: <%= f.file_field :uploaded_data, :size => "20" %></p>
<%= submit_tag('Attach', { :class => "bigButton" }) %>
<% end %>
In my local environment (upgraded now to Rails 2.3.2, I originally did
this in Rails 2.1.2) that sends a request to the Create method of the
attachments controller as expected.
However in the real server (Rails 2.1.2) the same sends a request to the
Index method of the attachments controller.
Anyone sees a reason why it goes to the Index method in the real server?
Maybe something is different in those versions (?)
Thanks.
--
Posted via http://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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---