Displaying 1 result from an estimated 1 matches for "contentcampaign".
2007 Aug 23
6
Calling a method on class creation
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:
user=User.new
Since I created a new instance of User, I should now have access to
the status property, e.g.: