respond_with(@awesomeness)
Thanks for the casts Ryan. They are always appreciated.
Brilliant Ryan, thank you very much!
Have you also looked into José Valim's work on Inherited Resourses. I'd love to see you do something on that theme also.
Keep up the top work!!!
D.
very very thank you!
Your job is fuckin' good!
I will donate.
Thanks a lot for the screecasts.
It seems a really small error has gone through, in the destroy method of your controller, the respond_with(@product) shall produce an error I think (as the product has just been destroyed).
That aside, you really rock!
Regards
respond_with accepts :only and :except options as well.. :)
you can use it for specific actions.. that's the only thing I missed on the video
great work man
@Renato, did you mean the respond_to method that takes these options?
I was wondering what the best way to test these controllers is when testing what happens depending whether the record is valid or not.
My best try so far:
errors = ActiveModel::Errors.new(Post.new)
errors.add_on_blank(:id) Post.any_instance.stubs(:errors).returns(errors) Post.any_instance.stubs(:valid?).returns(false)
thank you somuch. this is AWESOME. i am wait next video.
Speaking of respond_with - What do you think about putting it in an after_filter to avoid duplication?
Impressing .
Cant wait to migrate my present projects to Rails 3.
Eagerly waiting for your next video.
Bryan, for respond_with you removed the HTML specific part - but you left the flash[] in there? So what happens when an XML request is served? The flash is set but it's useless for XML, so it is delivered with the next HTML request, to which it does not belong? Or what am I missing?
Speaking of respond_with - What do you think about putting it in an after_filter to avoid duplication?
One thing that drives me nuts about the flash is that is sticks around until the next page is loaded.
For example, I like having a single/format for my flash messages and I use them for confirmation messages when CRUD'ing.
However if a user fails to save a record then the page is not redirected but a render event is called instead. This means that the flash is nicely displayed on the current error page but it ALSO sticks around for the next page (Where it isnt correct). I keep having to manually delete the flash whenever an action fails (after the render call) so that it isn't carried on to the next page.
I had no clue you could do 'redirect_to [:edit, @post]'. I think this is much more concise, especially when you get into nested routes. Great episode :)
I had no clue you could do 'redirect_to [:edit, @object]'. This is so much more concise than writing out 'redirect_to edit_object_path(@object)' in my opinion, especially when it comes to nested routes. Great episode :)
pecially when it comes to nested routes. Great episode :)
One thing that drives me nuts about the flash is that is sticks around until the next page is loaded.
@RJ You want to use flash.now instead of flash. Michael Hartl's Rails Tutorial at www.railstutorial.org (free to read online for rails 2.3 and 3, free to download for rails 2.3) talks about it. hope that helps.
A blind man who leans against a wall imagines that it's the boundary of the world.
My friend suggested me to visit your blog. Very well explained. I would like to say that it is very interesting to read your blog.Thanks for the write up! This is really some great stuff here!
Embedded flash notices, permanent cookies, and the details of respond_with are in this episode. really? so great.
When an object has errors, it will redirect to the location if specified. It is not handled in this screencast, but it is not working as it should.
http://gist.github.com/535722
Thanks for such a great post and the review, I am totally impressed! Keep stuff like this coming
The blog article very surprised to me! Your writing is good. In this I learned a lot! Thank you!
love converse all star,love yourself.High quality low price.It's fit for you.
The blog article very surprised to me! Your writing is good. In this I learned a lot! Thank you!
Some times, to a certain need, we have to convert PDF to image for enjoyment.
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
When an object has errors, it will redirect to the location if specified. It is not handled in this screencast, but it is not working as it should.
permanent cookies, and the details of respond_with are in this episode. really? so great.
the respond_with(@product) shall produce an error I think (as the product has just been destroyed).
Thanks for sharing your article. I really enjoyed it. I put a link to my site to here so other people can read it.
Good post, I can’t say that I agree with everything that was said, but very good information overall:)






