han.holl-546VmZ+UeKYX2WXlbB3fKg@public.gmane.org
2005-Mar-02 13:00 UTC
Action ''display'' doesn''t work in 0.10.0
Hello, While trying to get a 0.8.5 rails application to run under 0.10.0, I discovered that an action called ''display'' no longer worked. (As example it''s still existant in ctionpack-1.5.0/README). After a long search, I discovered that the reason is that ActionController::Base inherits from Object, and because there is Object#display it will no longer be called as an action. See ActionController::Base#hidden_actions. This implies that there are a _lot_ of reserved words, you cannot use as action names: ActionController::Base.public_instance_methods. These reserved words. moreover, are not guaranteed to be stable: every time some module gets included in the inheritance chain, od some module gets extended, the list changes. I don''t think this behaviour is correct: in an OO environment I want to be able to override methods that are above me in the inheritance chain, not forbidden to use the same name. Cheers, Han Holl
On 03/03/2005, at 12:00 AM, han.holl-546VmZ+UeKYX2WXlbB3fKg@public.gmane.org wrote:> I don''t think this behaviour is correct: in an OO environment I want > to be > able to override methods that are above me in the inheritance chain, > not > forbidden to use the same name.Would a list of reserved method names in the AP docs suffice? Care to supply a patch? - tim lucas
han.holl-546VmZ+UeKYX2WXlbB3fKg@public.gmane.org
2005-Mar-02 14:00 UTC
Re: Action ''display'' doesn''t work in 0.10.0
On Wednesday 02 March 2005 14:30, Tim Lucas wrote:> Would a list of reserved method names in the AP docs suffice? Care to > supply a patch? >No, I think the algorithm as it is now is wrong, because of the dynamic nature. Maybe actions should somehow register themselves. Han Holl
On Mar 2, 2005, at 7:00 AM, han.holl-546VmZ+UeKYX2WXlbB3fKg@public.gmane.org wrote:> On Wednesday 02 March 2005 14:30, Tim Lucas wrote: > >> Would a list of reserved method names in the AP docs suffice? Care to >> supply a patch? >> > No, I think the algorithm as it is now is wrong, because of the dynamic > nature. Maybe actions should somehow register themselves. > > Han Holl >Rather, it should exclude all public methods of Object (etc.), except those that have been overridden in the descendent class(es). I do something similar in Needle. I''ll see if I can work up a patch. - Jamis
han.holl-546VmZ+UeKYX2WXlbB3fKg@public.gmane.org
2005-Mar-02 15:52 UTC
Re: Action ''display'' doesn''t work in 0.10.0
On Wednesday 02 March 2005 15:42, Jamis Buck wrote:> Rather, it should exclude all public methods of Object (etc.), except > those that have been overridden in the descendent class(es). I do > something similar in Needle. > > I''ll see if I can work up a patch. >That would be nice. I''m a bit surprised that I''m the only one bitten by this: ''display'' features as action in several examples. Han