This is awesome, I'd like to se this combined with Formtastic, thanks for the awesome screencast!
i love formtastic. would be great if it is standard like ryans nifty generators.
Thanks for this screencast Ryan. This definitely enhances the functionality of episode #165. These casts on dealing with multiple edits, models, nested_attributes etc are extremely helpful for my self.newbie to wrap my head around these things.
Much appreciated,
Branden
This is xcellent screencast. Keep up the good work Ryan. I will be using this in my upcomgin RoR project.
+1 for combination with Formtastic.
Thanks for your work!
I love how you make the techniques in each screencast seem so simple, as in, "Why didn't I think of that!".
I think it inspires new guys like myself to sit back and look for a simple solution instead of over thinking a problem, which I tend to do all the time.
More times than not the solution is simple; it just takes a better understanding of the wonder that is rails!
Thanks for your work Ryan. I greatly appreciate it.
great episode, as usual :)
+1 for combination with Formtastic.
That's a great episode. Thanks a lot Ryan. It's very useful and perfect to put on practice on every rails project or any project. I like Ruby more. Simple and elegant. Thanks again Ryan.
You said the route would best be a GET and I agree; why not add :method => :get on the form to make it so?
Ryan,
Love the screenscasts! Can I recommend you do one on an administrative tool like Typus (http://intraducibles.com/projects/typus) or something similar. I have used Typus for the first time recently and found it extremely helpful in getting up and running quickly. It does require some configuration of YAML files but you also have the ability to override pretty much everything.
Keep up the good work! Thanks.
Awesome as ever. Perhaps someone would be kind enough to document f.error_messages in the API docs?
I watched it yesterday and was thinking it's trival, useless and will never use it. Or not soon.
And now it looks like it's perfect solution for my today's problem at work. Man, how do you do it?
I cannot understand why you wouldn't do a GET request instead. I mean, sure it will be a long query-string but that also means you could bookmark edit pages. If you keep track of certain products and update them daily that would be excellent.
Or is it really necessary with POST like you said?
Would be interesting to combine webforms2 with this. Following example is screaming at this screencast :)
http://webforms2.googlecode.com/svn/trunk/testsuite/003.html
Hmm, this line in the controller feels a little risky:
Product.update(params[:products].keys, params[:products].values)
"params" is a Hash (actually a subclass of Hash, HashWithIndifferentAccess), and its "keys" and "values" methods return arrays in no particular order. It's probably not a good idea to assume they'll pair up properly every time. Even if it works in practice, it probably exploits an undocumented fact about the Hash implementation.
Something like the following might be more bulletproof. It removes the assumptions but does basically the same thing:
keys = params[:products].keys
values = keys.map {|k| params[:products][k]}
Aside from that, thanks for all the helpful 'casts.
I watched it yesterday and was thinking it's trival, useless and will never use it. Or not soon.
very nice one, thanks!
+1 for combination with formtastic
+1 for usually using formtastic in railscasts ;-)
Ryan,
I haven't tried this yet, but is this the solution to completing the "survey series" (#196, #197) ?
Or do you have something else ?
If so, I'd love to see a final episode to complete the survey app, i.e. where a user can answer the questions on the survey.
Mike
Ryan,
If you click 'Edit Checked' without anything checked you get a walkback:
Couldn't find Product without an ID
How do you trap that error / post an error message?
Mike
Ryan,
I tried the following code, the flash gets displayed, but the 'Product.find' is still getting executed resulting in the error :
"Couldn't find Product without an ID"
begin
rescue params[:product_ids].empty?
logger.error("No products selected for 'Edit Selected'" )
flash[:notice] = "Nothing selected for 'Edit Selected' action"
redirect_to products_path
end
@products = Product.find(params[:product_ids])
Ryan - Great Cast once again!
A Question: How would you implement a "mass edit" facility?
What I mean to say is: say you had an attribute which you want to set to the same thing for ALL rows selected on the front form. How do you do this with a single control?
Cheers
In reply to myself, I checked out Episode 165
Result!
Another question:
How do you implement a check box that checks all the check boxes (if you know what I mean!)?
Cheers
how can I use nested_attributes with this approch? e.g. http://stackoverflow.com/questions/2445097/accepts-nested-attributes-with-model-update-for-multiple-models
Oh my, this is the third time Ryan describes EXACTLY what I was looking for...
kudos kudos kudos!
Hey this is really nice information. I was looking for something similar like this. Thanks for this useful information.
Your article is very interesting, I have introduced a lot of friends to see this article content, there will be a lot of attractive people to enjoy, I want to thank you for this article.
All I'm looking for a site on a very large and beautiful on this site are subject to all of you very
thanks
That's a great episode. Thanks a lot Ryan. It's very useful and perfect to put on practice on every rails project or any project. I like Ruby more. Simple and elegant. Thanks again Ryan.
Hey this is really nice information. I was looking for something similar like this. Thanks for this useful information.
Dear friends, our web site provides a variety of cheap price <a href=http://www.watchesky.com/omega-watches>fade omega watches</a> , welcome your arrival,just click here http://www.watchesky.com/ .
Thanks for sharing this code! Trying to find something like this for a while. It's very useful.
I am a fanatic watch collection, especially the well-known watches, you also can do, just click on my name!!!!!!!!
I am a fanatic watch collection, especially the well-known watches, you also can do, just click on my name!!!!!!!!
Please tell me it worked right? I dont want to sumit it again if i do not have to! Either the blog glitced out or i am an idiot, the second option doesnt surprise me lol. thanks for a great blog!
Fantastic Read! Looking forward to more! Bookmarked the site and will be back again!
love converse all star,love yourself.High quality low price.It's fit for you.
winni2078 08 23
http://www.juicycouture4u.com/
http://www.newstyleomega.com/
http://www.juicycouture4u.com/Juicy-Couture-Handbag.html
http://www.juicycouture4u.com/Juicy-Couture-Tracksuits.html
http://www.newstyleomega.com/
http://www.newstyleomega.com/
http://www.newstyleomega.com/
Any member of your group can post to your trip blog. This is a great way to share information with your team and your
supporters.<b><a href=http://www.hzzxdq.net>power strip</a></b> |<b><a href=http://www.jdxpwj.cn/booster-cable>booster cable</a></b> |
<b><a href=http://www.jdxpwj.cn/tow-rope>tow rope</a></b> |<b><a href=http://www.jdxpwj.cn/ratchet-tiedown>ratchet tiedown</a></b>
The blog article very surprised to me! Your writing is good. In this I learned a lot! Thank you! I like this blog very much for nice coding tutorial. Great article, especially the layout of the models. Could you do one on how to extend active merchant so that we can all contribute to the code base?
Some times, to a certain need, we have to convert PDF to image for enjoyment.
Discount Wholesale Electronics, Wholesale Cell Phones, Electronic Gadgets and More from the Best Dropship Wholesaler
Thanks for sharing your article. I really enjoyed it. I put a link to my site to here so other people can read it. My readers have about the same interets
Thanks for sharing your article. I really enjoyed it. I put a link to my site to here so other people can read it. My readers have about the same interets






