[Nitro] [Fwd: About the Menubar collision (follow-up)]

Arne Brasseur arne at arnebrasseur.net
Thu Jul 5 15:10:00 EDT 2007

I'm taking this on-list, I suppose nobody really minds.

I investigated your example a bit, the problem isn't with the <render 
"menubar" />, it's with you Menubar og model. In fact this is documented 
behaviour :P


      # Try to use Controller::xxx
      # gmosx, THINK: this looks a bit dangerous to me!
        # gmosx, FIXME: Class.by_name also returns top level
        # classes, how can we fix this?

        klass = constant("#{controller}::#{name}")
        puts "Searching element #{name} as #{controller}::#{name} => 
#{klass}"      # I added this
        # drink it!

This outputs:
Searching element Menubar as Home::Controller::Menubar => Menubar

So this indeed returns the top-level class. The constant method is from 
facets. It looks to me it doesn't work like one would suspect...


Arne Brasseur
arne at arnebrasseur.net

-------------- next part --------------
An embedded message was scrubbed...
From: Jimmy Jazz <Jimmy.Jazz at gmx.net>
Subject: About the Menubar collision (follow-up)
Date: Wed, 04 Jul 2007 20:28:47 +0200
Size: 34787
Url: http://rubyforge.org/pipermail/nitro-general/attachments/20070705/ad3bb1d3/attachment-0001.mht 

More information about the Nitro-general mailing list