Welcome to the fifth issue of This week in Rails, your weekly inside scoop of interesting commits, pull requests and more from Rails.
Some of you have asked for ways to share this newsletter with friends. Feel free to direct them to our sign-up page here. From there, they will also find a link to our archive page to get a taste of what they are signing up for.
No worries, you can catch the keynotes from the comfort of your home, office, couch or local beach. Follow the @RailsConf twitter account to find out how.
DHH responded to the first code ping-pong challenge. While they two pieces of code are not directly comparable, there are definitely a lot to learn from here.
@rafaelfranca is again the top contributor of the week! Please join me in thanking all these awesome people who dedicated their time to help improve the framework we love <3 <3 <3
Have you looked at the HTML source generated by the Rails form helpers? Ever noticed the wrapper div element? They were necessary at the time, but it's time for them to go. You won't be seeing them anymore in the next version of Rails!
Did you know that you can pass in any object that responds to load and dump as the second argument to serialize? This has been possible for a while now, but the docs are now updated to better document that behaviour.
This is a continuation of #11960. When an error occurred in the middle of a XHR request, Rails will now properly render the error details in plain text format, making it easier to debug with tools like Chrome inspector. This is one of those little things that makes Rails so awesome!
I wasn't aware that you could be making these kind of comparisons, seems like a pretty neat trick! Note that it actually retrieves the records from the database by calling to_a, so this is probably not something you would want to do on large collections. However, I can see it being useful in tests.
If you are feeling particularly destructive, you can now call destroy your counter-cached associations as many times as you like!
One More Thing™
I couldn't find a link for this one – but if you have registered for RailsConf you should have received an email from Heroku about their Community Office Hours during RailsConf. I'll be joining many other awesome Rails contributors there, drop by during one of these time slots to say hi!
Wednesday, 3:00 - 4:30pm
Thursday, 3:50 - 5:20pm
Wrapping Up
And that's it for this issue of This week in Rails. My apologies for the out-of-schedule delivery this week, but I hope you enjoyed it nonetheless!
As always, there are a lot more interesting things happening on Rails than I can cover here, so I encourage you to check them out!
If you have any feedback for me, please feel free to email me or let me know on twitter!