Ruby Journal

How to Write Custom Serializer for ActiveRecord#serialize

| Comments

Rails comes with a powerful and convenient serialize method that would do the serialization/deserializtion for a specify column of an ActiveRecord model. In today tutorial, I’ll walk you through on how to write a custom serializer that would encrypt/decrypt your serialized value for extra security.

Liquid Template in Ruby Done Right

| Comments

Liquid Templating Engine is an awesome technology and with the power of gem ‘liquid’, everybody can start using without much hassles. I saw many projects used this gem but sadly most of them are quite bad. In this tutorial, I’ll go through a bad example and show you how to refactor it.

Genereate Gems Dependency Graph With Bundler

| Comments

One of the features I like about RubyMine is the gems dependency graph. This graps shows you all explicit/implicit dependencies of gems defined in your Gemfile. In this short tutorial, I’ll show how to generate this graph with Bundler.