[Nitro] Difference between /account and /account/ ???

George Moschovitis george.moschovitis at gmail.com
Tue Sep 18 09:28:45 EDT 2007


Thanks for reporting, I will have a look at it.

-g.

On 9/18/07, Thomas Leitner <t_leitner at gmx.at> wrote:
> Hi everybody,
>
> I have a problem with the repo version of nitro. I have the following
> controller in app/controller/account.rb:
>
> class Account::Controller
>
>    include FormHelper
>
>    def index(*args)
>      p 'in index'
>      @accounts = Account.all
>    end
>
> end
>
> where Account is a model object and the following app/template/
> account/index.htmlx file:
>
> <Page>
>
>    <?r p @accounts ?>
>    <?r accounts = @accounts ?>
>    <?include href="/account/list" ?>
>
> </Page>
>
> and app.rb as follows:
>
> #!/usr/bin/env ruby
>
> $DBG = true
>
> require 'nitro_and_og';
> include Nitro
> require 'nitro/part/admin'
>
> require 'app/setup' # includes all controllers and models
> require 'app/skin' # defines the Page element
>
> app = Application.new
> app.dispatcher.root = Manager
> app.dispatcher.root.account = Account
> app.start
>
> The problem is that when navigating to /account everything works just
> fine and I get a list of my accounts. However, when using /account/
> the Account::Controller#index method does not seem to be called which
> results in the @accounts variable not being correctly initialized and
> an error afterwards.
>
> Any ideas why this is so? Kashia suggested on #nitro that this may be
> a bug?!
>
> Thanks for the help,
>    Thomas
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>


-- 
http://www.me.gr
http://phidz.com
http://blog.gmosx.com
http://cull.gr
http://www.joy.gr
http://nitroproject.org


More information about the Nitro-general mailing list