This project is archived and is in readonly mode.
form_for doesn't work wit
-
Pratik
- Assigned user set to Pratik
- State changed from new to incomplete
-
Prem Sichanugrist (sikachu)
- State changed from incomplete to stale
-
Zach Dennis
According to its API is most certainly can:
form_for(record_or_name_or_array, *args, &proc)Also, it can accept arrays where everything leading up the last element is a symbol:
<% form_for([:admin, @post]) do |f| %> ... <% end %>The suggestion of the this ticket was to make it so you could say:
<% form_for([@admin, @post]) do |f| %> ... <% end %>This made form_for more flexible and didn't require you know in advance the specific type of resource (or its path) in the partial. It could be determined at run-time.
As something changed recently in Rails which got rid of passing in arrays in form_for?
-
Rizwan Reza
- State changed from invalid to open
Can you make a patch of what you're proposing? Thanks!
http://rails.lighthouseapp.com/projects/8994/sending-patches
-
Dan Pickett
- Tag changed from actionview, form_for to actionview, bugmash, form_for
-
Ryan Bigg
This ticket is 2 years old and I don't think it's valid any more.
-
Christopher Redinger
Zach,
Can you provide a little more clarity on what this should do. Specifically, what does @admin provide in the example you cited?
-
Zach Dennis
Christopher, read my comment on this ticket from January 21st, 2010. Let me know if that is not clear for you.
Ryan, I think it's still valid. :)
Everyone... there doesn't seem to be any disagreements with the proposed functionality, just a proper patch. Is this accurate? If so, since no one has taken my offer for making the patch, I will shoot to make one in the next week or so, maybe sooner!
-
Dan Pickett
I'm +1 on this - if polymorphic_url/path supports an array of objects form_for should as well. If I have time this weekend I'll see if I can craft a patch
Christopher (and Zach correct me if I'm wrong) I think the intent is for the above example to do a PUT on reimbursement_expense_path(expense.expense_reimbursement, expense)
-
Anil Wadghule
This issue looks like non-existent now. Check rails app attached.
