Code + Product

Understanding Time, DateTime, and timezones in Rails

Sep 13th, 2015 in Ruby on Rails

My notes on using RoR for formatting times and datetimes to strings, and parsing strings to time objects.

Rspec - How to test a controller has included concerns

May 18th, 2015 in Ruby on Rails

A short Rspec snippet to verify the correct concerns have been included in a controller.

How to split Rails routes.rb into multiple smaller files

Apr 27th, 2015 in Ruby on Rails

Organise your routes.rb file into smaller files, works in both Rails 3 and 4.

Rails 4 Conditional Page Cache for Logged In Users

Feb 18th, 2015 in Ruby on Rails

A technique to generate a full static HTML page for caching, based on any specified conditions.

Recommended Rspec style for Rails models

Feb 11th, 2015 in Ruby on Rails

Listing out my top 10 recommendations for how to structure and layout rspec tests for Rails models.