Skip ActiveRecord callbacks

 rails, active_record

Callbacks are great and many business rules are often implemented in those callbacks to maintain data consistency and perform useful actions in app. As you might know, we can define

Gem Idol: Friendly Id

 rails, best practices

This week, I would like to introduce a gem which is being used in almost every project I have been working on. And it becomes more important for us nowadays

Gem Idol: Figaro

 rails, best practices

Today, I really want to start something different which I believe would be very helpful to new Rails developers. I remember the time when I first came to Rails world,

Polymorphic Routes in Rails

 rails

In Rails, you can define a model as polymorphic like the following: class Post has_many :comments, as: :commentable end class NewsItem has_many :comments, as: :commentable end class Comment