Forum: Ruby on Rails .erb invoked unexpectedly

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
RichardOnRails (Guest)
on 2008-12-16 07:02
(Received via mailing list)
I've got an app that starts up with:
map.root :controller => "csvs", :action => 'startup'

The csvs_controller.rb is posted on http://www.pastie.org/340100

The startup routine checks the RAILS_ROOT + "/public/data/csv"
directory for any files.  Presently,  the directory has none.
Consequently, "aHashes", an array of hashes in line #112 should be
empty.

That is indeed the case, as evidenced by the logger msg from line 113
appearing in  the Command Window running Mongrel.

Therefore I expect lines 114 & 115 to be honored, i.e. nothing to
rendered and the index method to be invoked.

Instead, I get:
Missing template csvs/startup.erb in view path K:/_Projects/Ruby/
_Rails_Apps/PayrollApp/app/views:

Why is the app attempting to render something I don't expect ever to
happen?  (If I do find files,  I'll insert their attributes in the
database and redirect to index.

Where am I going wrong?

Thanks in advance,
Richard
RichardOnRails (Guest)
on 2008-12-16 08:03
(Received via mailing list)
BTW,  I included the routes.rb on that Pastie file.
--
R

On Dec 16, 12:01 am, RichardOnRails
Frederick C. (Guest)
on 2008-12-16 11:17
(Received via mailing list)
On Dec 16, 6:03 am, RichardOnRails
<removed_email_address@domain.invalid> wrote:

> > Why is the app attempting to render something I don't expect ever to
> > happen?  (If I do find files,  I'll insert their attributes in the
> > database and redirect to index.

You typoed :notihing

Fred
RichardOnRails (Guest)
on 2008-12-16 16:54
(Received via mailing list)
Hi Fred,

As you've done many times,  you pulled my fat out of the fire.

Once again,  thank you very much.

Best wishes,
Richarrd

On Dec 16, 4:16 am, Frederick C. <removed_email_address@domain.invalid>
This topic is locked and can not be replied to.