Looi Ferng YiUnderstanding PostgreSQL connection usage on HerokuOne of the production applications I work on has a habit of occasionally raising the following error:Jan 16, 2017Jan 16, 2017
Looi Ferng YiGrowing painsObjects keep growing as additional requirements are placed on them. As objects grow, they get large and unwieldy. We need to keep them…Dec 20, 2016Dec 20, 2016
Looi Ferng YiExtracting unique value generation out of an ActiveRecord modelI needed to generate unique values for several models. The most common method to do so is as follows:Jun 23, 2016Jun 23, 2016
Looi Ferng YiDisentangling web events from your modelsWe’ve all probably implemented analytics or notifications in our web applications, which involves calling external services upon certain…Mar 6, 2016Mar 6, 2016
Looi Ferng YiInverting block arguments in RubyI feel that the curly brace block form is a bit kludgy as the reading flow is broken up by spaces. Chaining multiple arguments taking…Jan 15, 2016Jan 15, 2016
Looi Ferng YiDiving into ActiveRecord#SaveRails provides a very simple API to end users. Under the hood however, is a maze of method calls with duplicate names. For instance, saving…Dec 8, 2015Dec 8, 2015
Looi Ferng YiWhen does #to_proc not return a proc?I decided to do some exploration into the differences between blocks, procs and lambdas:Dec 2, 2015Dec 2, 2015
Looi Ferng YiHow I migrated a couple of Rails apps into a single multitenanted app on HerokuI needed to multi-tenant an existing Rails app which already had a couple of instances running on Heroku, and settled on Apartment for its…Nov 2, 2015Nov 2, 2015