Episode #287 - July 10th, 2012
The State of the Ruby stack, neater Dotfiles, ActiveRelation merge, ways to learn RubyMotion, custom flash types, and Asynchronicity.
This episode is sponsored by TopRubyJobs
If you're looking for a Ruby job or for top Ruby talent, then you should check out Top Ruby Jobs. Top Ruby Jobs is a website dedicated to the best jobs available in the Ruby community.
New Relic's State of the Stacks
New Relic published the State of the Stacks, a report on their platform usage for different languages. On the Ruby side, there are two different camps. The pioneers using the latest and greatest: 1.9 and Rails 3.1 and 3.2 and and almost equal sized group using 1.8.7 and Rails 2.3. PostgreSQL is also the leading database solution by far.
Dotfiles, it's not always easy to track them. Some people store them inside a version controlled directory and symlink them to their home directory, but listener Matthew Bridges sent us a note about Dotify, a neat little gem he built to manage all of that. I can copy all dotfiles from your home directory, link them individually, unlink them and even edit them directly using `dotify edit ` and save all of it to GitHub using `dotify save`.
ActiveRelation merge, a hidden merge
Scopes are a neat feature of Rails 3, but what happens when you need to use a scope from an associated model to filter something on the current model. Imagine you have a User that has many articles through a Collaboration model. Now you have an article and you want to get the users that were editors on that article with a single query. The collaboration already has an editorial scope so why not use that? With Arel merge you can do exactly that, effectively using another model’s scope to filter a query.
Laurent Sansonetti’s RubyMotion made a lot of waves when it first launched some weeks ago and there has been many blog posts and tutorials written on how to get started.
A new site called RubyMotion tutorials was launched to organize these resources a little better. It looks like a good place to start scouting the land of RubyMotion.
Rails Edge: Custom Flash Types
Oscar Del Ben noticed recently that the ability to register custom Flash types had been added to Rails Edge (soon to be Rails 4 beta).
You can now add custom flash types by simply calling `add_flash_types` and passing it symbols like :critical or :script if you want to use the flash for more than just user-facing messages.
Tweet of the Week: Async
Once you go Async, back go never you
– @hotgazpacho (Will Green)