I have a function (creation of a record in a table) that must be executed within before_save routines of models. What is the preferred way to do it? I am in Rails 3.1. A module in lib? A class in lib? application.rb?
Any example?
Thanks
Module in lib/
. Why a class if it's just a function? And don't clutter application.rb
.