#6 Shortcut Blocks with Symbol to_proc
Mar 16, 2007 | 3 minutes | Active Support
It may have a goofy syntax, but the Symbol#to_proc feature Rails adds allows you to do simple blocks very quickly and easily.
Fast Tests
A slow test suite can put a damper on test-driven development. In this episode I show a variety of ways to optimize specs including: selective testing, preloading Rails, and testing outside of Rails.
(17 minutes)
Time Zones (revised)
Active Support makes it easy to work with time zones. Learn how to add a Time Zone select field to a user form and watch out for the gotchas.
(7 minutes)
Multitenancy with PostgreSQL
PostgreSQL Schemas can help create a multi-tenant app by keeping data separate at the database layer. Integrating with migrations can be tricky though, so watch this episode for the full details.
(11 minutes)
Authorization from Scratch Part 2
This finishes the series on building authorization from scratch by refactoring the permission logic into a DSL, restricting authorization with attributes, and combining with strong_parameters to protect params.
(20 minutes)
Template Handlers
Here I will demonstrate creating two template handlers. One for Ruby which is great for JSON or CSV formats. Another for interpreting Markdown which is useful for informational content.
(12 minutes)







