Forum: Ruby on Rails Has anybody stored two same methods in a controller class?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
20f29b1cbe934fab6eb89db84b9d98fe?d=identicon&s=25 MrKiss (Guest)
on 2007-03-18 19:45
(Received via mailing list)
I did.

But it works without error

Lower method works and upper method idle. Name of two methods are same

is this a bug?
70225136eacd3d870f64e03bff678655?d=identicon&s=25 Russell Norris (Guest)
on 2007-03-18 19:54
(Received via mailing list)
That's because Ruby allows you to redefine methods on the fly, so that
second definition is viewed as just that. A redefinition. The first is
nullified effectively.

This topic is locked and can not be replied to.