I have a model User that has property called status. Status is just a
string that can only be evaluated and not persisted. I.e. it doesn’t
have a field in the user table.
Anyways, I would like a method get_status to be called anytime I
create a new instance of User. For example:
Since I created a new instance of User, I should now have access to
the status property, e.g.:
Here is my User class:
class User < ActiveRecord::Base
#evaluate the status
#@status = …
How would I call get_status whenever a new instance of User is
created? It’s constructor?