Re: [Rails-core] SimpleDelegator autoloading issue

2014-03-03 Thread Henrik Nyh
On Mon, Mar 3, 2014 at 12:57 PM, Xavier Noria f...@hashref.com wrote: Just a remark about this comment: Load stdlib classes even though SimpleDelegator inherits from BasicObject. The purpose of that const_get is to load top-level constants (which belong to Object), regardless of

Re: [Rails-core] SimpleDelegator autoloading issue

2014-03-02 Thread Henrik Nyh
Oh, good call with BasicObject. I see its docs ( http://www.ruby-doc.org/core-2.1.1/BasicObject.html) mention this exact case: Access to classes and modules from the Ruby standard library can be obtained in a BasicObjecthttp://www.ruby-doc.org/core-2.1.1/BasicObject.html subclass by referencing

Re: [Rails-core] SimpleDelegator autoloading issue

2014-03-02 Thread Henrik Nyh
SimpleDelegator with that implementation of const_missing. The other evil being to let this gotcha remain. On Sun, Mar 2, 2014 at 6:14 PM, Henrik Nyh hen...@nyh.se wrote: Oh, good call with BasicObject. I see its docs ( http://www.ruby-doc.org/core-2.1.1/BasicObject.html) mention this exact case: Access

Re: [Rails-core] SimpleDelegator autoloading issue

2014-03-02 Thread Henrik Nyh
On Sun, Mar 2, 2014 at 8:11 PM, Xavier Noria f...@hashref.com wrote: I believe the culprit here is Delegator. Delegator owns const_missing, it is all or nothing (reproduced from memory): but it should not in my view: after trying its heuristic it should delegate to super if defined in case

Re: [Rails-core] SimpleDelegator autoloading issue

2014-03-02 Thread Henrik Nyh
On Sun, Mar 2, 2014 at 10:20 PM, Henrik Nyh hen...@nyh.se wrote: On Sun, Mar 2, 2014 at 8:11 PM, Xavier Noria f...@hashref.com wrote: I believe the culprit here is Delegator. Delegator owns const_missing, it is all or nothing (reproduced from memory): but it should not in my view: after

Re: [Rails-core] Re: Idea: status code 404 AND debug info for RecordNotFound, RoutingError

2013-06-27 Thread Henrik Nyh
Oh, I let the custom better_errors page fool me. The standard error page does give a 404 for RecordNotFound (in 3.2, but I'm sure Rails 4 works as well). Sorry to bring this up before experimenting more, and thanks for pointing me in the right direction. On Wed, Jun 26, 2013 at 8:09 PM, Bob