joshuago’s ruby_on_rails Bookmarks
23 APR 2011
Use simple requires in your library. If you need to catch the case where the dependency could not be found, rescue from plain old LoadError, not Gem::LoadError.
23 APR 2011
Don't mess with the load path. Define VERSION. Declare gem dependencies in your gemspec, not in your "lib/" subdirectory.
15 DEC 2010
A great summary of the new things in the Ruby and Rails communities over the course of 2010. Good for reference when trying to keep up with all the new technology out there, even for seasoned Ruby programmers.
20 JUL 2010
A really good explanation of Ruby modules as mixins, bundles of functionality.
20 JUL 2010
An excellent explanation of one of the main purposes of Ruby modules: namespacing, and a fun read.
15 JAN 2010
An example of how a Presenter helps keep controllers thin, especially when an action needs to pull up objects of many different kinds of models using different criteria.
12 JAN 2010
How to get inheritable class attributes working properly with parent classes and subclasses. A pretty involved process necessary for getting around the obvious approach, which does not work.
05 JAN 2010
Any time a string could be used over and over, a symbol may be a good candidate for replacement. If the content (i.e. the sequence of characters) of the object is important, use String. If the identity of the object is important, use a Symbol. Save memory.
30 DEC 2009
An overview of the modularity improvements that have gone into Rails 3, from Yehuda Katz.
30 DEC 2009
Yehuda Katz on the work he did with reducing general controller overhead and speeding up the rendering of a collection of partials for Rails 3.