[Nitro] RFC: Basic Points for a Better Nitro/Og

George Moschovitis george.moschovitis at gmail.com
Sat Sep 22 05:08:08 EDT 2007

> Barrier three: Version conflicts. Right now, a gem install simply doesn't
> work. Try gem install rails and everything works as advertised. Try gem
> install nitro and virtually nothing works as advertised. Again, accepted
> that this will take a while. Still, ease of entry makes it a softer sell.

!!! I had the idea that gem install DOES work as advertized. You are trying
to install the 0.41.0 gems?

> I'm trying really hard to love Nitro and Og, but it's tough to know what's
> there. My expectations are clearly different from what's there. E.g.,
> what's the right directory structure. Not documented. Examples have
> templates in a flat directory called templates. Is this mandatory or
> optional.

you can put them in whichever directory you like, just setup

Template.root_dir = "my/dir"

Can they go in subdirectories. Do I need to experiment? E.g., how do I
> create a link to an action like 'new'? I know how to do it in Rails. Is it
> really a <a href=> tag in Nitro?

They can go in subdirectories... You can either map the controller on a

app.dispatcher.root.my.subdir = MySubDirController

or use the following convention in your action name:

def my__sub__dir__action

maps to => my/sub/dir/action

you can use simple hrefs or some helpers:

<a href="/mycontroller/myaction" />
<a href="#{R MyController, :myaction}""/>
<a href="{{MyController, :myaction}}"/>
or from a template in the controllers dir
<a href="{{:myaction}}" />

please notice that the helper versions are aware of the routing systmem and
the mount point of your controllers.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070922/67289707/attachment.html 

More information about the Nitro-general mailing list