Technology Insights

ActiveRecord SQL in script/console

Rails’ ActiveRecord displays the exact SQL queries it performs into the development log. It is inconvenient to watch this log while you’re working in the `script/console` environment, however, and most advice for redirecting that log to STDOUT seemed not to work. Thanks to [Jamis Buck](http://weblog.jamisbuck.org/2007/1/31/more-on-watching-activerecord “More on watching ActiveRecord”), though, the solution has come to…

Technology Insights

Passing Parameters to Partials

Partial basics Some different things about passing parameters to partials Basics of passing parameters (i.e. locals) into partials – Why are parameters for partials (locals) passed differently than params for urls?!? Don’t know, but basically use the locals hash in both the render call and use the name of the local in the partial itself.…