[Nitro] gen and parts

Fabian Buch fabian at oggu.de
Wed Aug 9 13:38:55 EDT 2006


Am 09.08.2006 um 18:33 schrieb gabriele renzi:
> should we rename FooPart into BarPart? what about controllers?
> are there any Server.map["/foo/"]=FooController to change?
> I'm asking because this is all stuff I'm doing with gen scaffold, but
> there the input files are strictly controlled.
>
>
> I think we could just replace every Foo with Bar, in .rb files, and
> filenames, leaving .xhtml+media untouched, is it ok ?
>
> Or possibly this is just something useless in the end and we are just
> making everything too complex when standard copying as in the original
> patch is enough? :)

Yeah, I think that's complicating it too much and I wouldn't rename  
parts at all. It's confusing if the AdminPart suddenly is known as  
BarPart. That's what's nice about Server.map, you can map it wherever  
you want, with the name you want. That should be sufficient.

If you want you can make gen set Server.map to "bar" when renaming a  
part as bar, but I wouldn't touch the internals of a Part too much  
(like renaming AdminPart to BarPart (and then also the  
AdminController to BarController?)).

Fabian


-- 
Nitro Q&A: http://oxyliquit.de/
Blog: http://blog.fabian-buch.de




More information about the Nitro-general mailing list