In his RailsConf keynote, Aaron Patterson talked about the some problems that comes with inheriting built-in classes. He eloborated on some of those details in this two-part blog post (part 2 here).
This week's top contributors include @tenderlove, @senny and @rafaelfranca. Big thanks you to these 30 contributors who helped improve our framework this week. Hope to see you on the list next time! <3 <3 <3
If you are like me, you make typos all the time. Don't worry, @schneems got your back. With this pull request, the Rails command line tools can now read your mind.
Related: check out the wikipedia article for the Levenshtein distance function if you want to understand how this feature works.
This is a bit of an accidental history, but the to option in the router used to support some bizarre combination of strings and symbols with wildly different semantics. These are now deprecated on master.
As mentioned last week, the deprecation of *_filter methods in Action Controller are temporarily reverted to make it easier for gems maintainers. You should start migrating to *_action though, because the old methods will eventually be deprecated and removed.
Cool Ruby trick – as a convention, Rubyist uses an underscore to represent a method/block argument that you don't care about. Did you know that you can also use def some_method(*); ...; end to ignore all arguments passed to a method?
If you are building a Rails application for archaeologists, you might be interested in this one. Currently there is a bug that causes these really old dates to be shifted by one when written to the database. Fortunately, @edogawaconan fixed this for us so all your dinasor models should have the correct age now.
And that's it for this issue of This week in Rails. I say this every week, but this week there's an usually huge list of 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!
Thank you for reading! <3 <3 <3
P.S. If you liked what you read, please share this newsletter with your Rails friends!