[Nitro] Difference between /account and /account/ ???
george.moschovitis at gmail.com
Tue Sep 18 09:28:45 EDT 2007
Thanks for reporting, I will have a look at it.
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
> where Account is a model object and the following app/template/
> account/index.htmlx file:
> <?r p @accounts ?>
> <?r accounts = @accounts ?>
> <?include href="/account/list" ?>
> 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
> 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,
> Nitro-general mailing list
> Nitro-general at rubyforge.org
More information about the Nitro-general