Not everyday that you would run into STI (Single Table Inheritance). I’ve been setting up shipping and billing addresses for my User model in the recent project I’m working on and STI provides a great solution. However, there’s a little trick that seem to be missed by many STI articles.
Continue reading
When testing uniqueness validations with shoulda-matcher in RSpec, an error could occur when the an attribute of the class also has a not null constrain on the database.
Continue reading
So recently I’m learning AngularJS. A fun framework that extends HTML and lets you build applications with dynamic views. I’ve decided to play with Rails with AngularJS handling the client side.
Continue reading