.erb invoked unexpectedly


#1

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


#2

BTW, I included the routes.rb on that Pastie file.

R

On Dec 16, 12:01 am, RichardOnRails


#3

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


#4

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