This project is archived and is in readonly mode.
Allow explicit placement of hidden fields with nested models
-
Eloy Duran
I edited your ticket to fix the formatting. Parts of your HTML were missing.
-
Eloy Duran
- Assigned user set to Eloy Duran
I like the idea. However, as we have no other hidden_fields yet, I think it feels a bit heavy. How about just checking if a hidden field for :id was created? Not sure if that would make the code much easier though… Thoughts?
-
Adam Milligan
What about the destroy (née delete) hidden field? Does the form builder not also output that if the model is marked for destruction?
-
Will Read
Elloy, I've taken your suggestion into consideration and created a new patch. The patch now does exactly as you recommended and only checks if a hidden field for :id was created.
-
Tor Erik
+1 for this functionality. And yes, will this cater for the destroy/delete field as well?
-
Eloy Duran
- Milestone set to 2.3.6
@Will Looks good, I'll check it out and apply it probably somewhere next week. Thanks!
@Adam & Tor: Nope, that has to be handled by the user. By either adding a hidden_field or checkbox depending on the situation. I'll happily review patches for this.
-
Will Read
Changed method and variable name "emitted_hidden_field" to "emitted_hidden_id" to be more succinct. Eloy, if you haven't applied this patch yet, please use the latest attachment.
-
Repository
- State changed from new to resolved
(from [88d2e4ca6fdf0d0df9d7d71bae1ecbde4f1d46e2]) Allow explicit placement of hidden id element for nested models.
[#3259 state:resolved]
Signed-off-by: Eloy Duran eloy.de.enige@gmail.com
http://github.com/rails/rails/commit/88d2e4ca6fdf0d0df9d7d71bae1ecb... -
Repository
(from [7fadb3f261fc7cc753d303d0fbe2cbf019385f99]) Allow explicit placement of hidden id element for nested models.
[#3259 state:resolved]
Signed-off-by: Eloy Duran eloy.de.enige@gmail.com
http://github.com/rails/rails/commit/7fadb3f261fc7cc753d303d0fbe2cb... -
W. Andrew Loe III
This went out with 2.3.5, it should probably be on the 2.3.5 milestone.
-
Eloy Duran
- Milestone changed from 2.3.6 to 2.x
@Andrew: I'm not sure what it is that you mean, but the commit is in 2.3.5: see the commit on 2009-11-15 http://github.com/rails/rails/commits/v2.3.5
-
Eloy Duran
Ah, do you mean that the ticket's milestone should read 2.3.5? :)
If so, I understand, alas, I don't have that much authorization…
-
dave.cavell (at gmail)
But an is not allowed in a
. -
dave.cavell (at gmail)
But an input is not allowed in a tr.
