Activerecord attribute without db column



I’ve a model that is stored to the db, but just one of its atribbutes
doesn’t have a corresponding column on the table (it is used just for a
calculation and still requires validation).

I’ve been succefull by doing what is explained in

But I get an error of a non-existent column for the attribute I don’t
to store.

Any idea?

Thanks everybody


In the model, use:

attr_accessor :attribute_name

– Tom M.