On Monday, March 3, 2014 12:04:14 AM UTC+1, Henrik N wrote:
>
> On Sun, Mar 2, 2014 at 10:20 PM, Henrik Nyh <[email protected]> wrote:
>
>> On Sun, Mar 2, 2014 at 8:11 PM, Xavier Noria <[email protected]> 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 there are more heuristics above. 
>>> Something like this (off the top of my head):
>>>
>>
> This small experiment illustrates that your solution does the trick: 
> https://gist.github.com/henrik/9314943
>

Actually, it didn't work within a real Rails app, so I did this for 
now: https://gist.github.com/henrik/9321626

If I find the time I'll see if I can do something more like your solution. 
I definitely like the idea of modifying SimpleDelegator to be more general, 
not more tied to Rails.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to