If you’ve done much Rails coding, you’ve probably heard the guideline: “skinny controller, fat model”. But achieving this can be easier said than done. Especially when your controllers are bloated with …
Category: Freebies
Write expressive tests by mastering RSpec matchers
Learn to deeply understand and effectively apply RSpec's advanced matcher DSL.
Two screencasts, two ways to eradicate Ruby nil values
Learn two ways to avoid switching on nil in Rails apps, in this double feature from RubyTapas and Upcase
Refactoring Ruby: DRY up your domain models using a struct table
When refactoring Ruby code, getting a fresh perspective on the data model can help drive out a cleaner design.
Understanding Ruby Thread-Local Variables
Global settings can cause havoc when threads are introduced. Learn when and how to use Ruby's thread-local variables instead.
Episode #263: Immutable Enumerators with Tom Stuart
In today's special guest episode, Tom Stuart shows us the benefits of using enumerators as immutable collections.
Episode #249: Unindent
In today's episode we explore methods for unindenting text. Along the way, we'll learn some tricks and play some code golf.