Forum: Ruby method def

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Anita A. (Guest)
on 2009-01-06 23:04
I know def active? but I need:
def active=(val)
and I cannot find a good example for it. I need val to equal a certain
value different that true or false when user is active.

Thank you,
Anita
Roger P. (Guest)
on 2009-01-08 08:41
Anita A. wrote:
> I know def active? but I need:
> def active=(val)
> and I cannot find a good example for it. I need val to equal a certain
> value different that true or false when user is active.

looks like you know what you're doing.  What context is this?
might want to google 'attr_accessor'
This topic is locked and can not be replied to.