I have a model with a complete: logical column that I would like to override, so I can add conditional code.
I had never redefined the ActiveRecord attribute before and wanted to know if the method below is good practice?
class Article < ActiveRecord::Base
def completed=(b)
write_attribute(:completed, b)
end
end
source
share