#165 Edit Multiple
Use checkboxes to select multiple records and edit them all in one form as shown in this episode. With virtual attributes you can even edit values relatively!
- source codeProject Files in Zip (94.3 KB)
- mp4Full Size H.264 Video (22.9 MB)
- m4vSmaller H.264 Video (15.5 MB)
- webmFull Size VP8 Video (40.9 MB)
- ogvFull Size Theora Video (33.8 MB)
Another great screencast! This is the first thing i do on Mondays. Love it!
Many thanks Ryan, great screencast as always !!!
It seems that there's a problem with the iPod version ?
The requested URL /ipod_videos/165_edit_multiple.m4v was not found on this server.
Anyway great work as ever !
I agree with Richard, I have a 404 on the ipod version?
Thanks for making Monday mornings not suck.
I really look forward to your Monday morning Railscasts. Thanks again Ryan. I can't wait to watch this on my break this morning.
Can't use the download link nor iTunes to download this (fantastic looking) podcast.
Please fix it. :)
We need you and your podcasts!
Sorry about that guys, forgot to upload the iPod version. I will do it shortly.
I too am unable to view the Railscast via download link on Safari or save file as or even the iPod link.
As Brian said above "Thanks for making Monday mornings NOT suck" - I second that.
The m4v version is up now.
No it isn't.
Sorry about the downtime guys. Everything should be up now.
How about a Railscast about "normal" edit forms for several model objects on the same page. Like this one, but allowing you to change multiple product names at the same time.
Such an inspiration
Your lessons are wonderful!!
If I can make a suggest: Wouldn't be better if you make railscasts wide enough to see the code without scrolling? If not the default choice, at least a link to see it at 1024px wide... a lot better than changing it with firebug!!
Thanks Ryan, I love your screencasts!
Nice screencast! Thanks!
Another interesting one would be adding another button to the form to delete the selected records. Since you can't define a form to have two different actions, I've always wondered if that can be done in a RESTful way. Do you just do two different things in the same action?
I guess you already do that with your preview/submit buttons to add a comment ;-).
Oops! Sorry, bad example, and it's already covered in episode 138.
I was referring to a form with two completely different actions and even diferent methods (such as edit and delete).
@Javier: i'm not sure im really getting what you mean.. you could make an edit-form, with an additional button_to to your delete action?
@davide: I thought button_to created another form, and HTML doesn't allow one form inside another one. Nor the "button" tag allow you to specify a different action.
Ryan I have a problem but it's not with this episode I have wall on my page like this but long single string become a problem in view how can I prevent this for example.
First of all another useful screen cast. Would be nice if some AJAX is thrown in there, but looks good as it is. Another thing Ryan, if you wanted to change the name of 3 selected products, hows that done as the form only has one text_field for name and i believe if you enter some name in the text_field that will apply to all three??? can you please shed some light on that?
waqas, wasnt that kind of the point? if you want to change the names individually you can do that easily with the regular form.
any ideas about a check-box multiple delete?
(I'm stuck with a routing error)
any help is welcome
i use will_pagine to navigate through a long table. how do will_paginate remember the checked checkboxes.
I need your help
thanks in advance
is there any way for selecting records like this from one model to add another model records. (both create and update)
I just want to point out that you should use
falsefor any boolean fields that you have. As seen in the ASCIIcast:
form.select :discontinued, [["Yes", true], ["No", false]]
You may be tempted to use 1 and 0 since those are the values used in the database for a TINYINT, but Rails will not show the correct default option for the select menu if you use integers. So make sure you use booleans!