I want to add some behaviour to ActiveRecord::Base, so I did this:
- Added ActiveRecordExtensions.rb in lib directory
- Added the following code to this file
“def solicitation_date_formatted \n” +
- Added the following line to environment.rb
In every model that I want to use the extension I add the following
It works well, I have all the functions available in my model. But,
validations just stop working. all validates_presence_of just don’t
work. Anybody knows what could be this?
Thanks in advance.