Pluralize off, however one table in plural

I have a database in execution, and the tables in singular. However one
table is plural, and also your controller, view, model…When open in
browser (http://localhost:3008/clientes), the follow error appear:
uninitialized constant Cliente. How I make for to recognize the
“clientes”?

El 03/01/2007, a las 20:33, Marcelo J.
escribió:

I have a database in execution, and the tables in singular. However
one
table is plural, and also your controller, view, model…When open in
browser (http://localhost:3008/clientes), the follow error appear:
uninitialized constant Cliente. How I make for to recognize the
“clientes”?

If it’s looking for Cliente that should be your code doing something
like Cliente.find(:all)

It would fail for ClienteController instead


Posted via http://www.ruby-forum.com/.


Jorge B. Ordovás [email protected]
http://amedias.org/ [ES]
http://koke.amedias.org/ [EN]

Warp Networks http://www.warp.es/
María de Luna 11, 50018 Zaragoza,
España

I already am using Clientes.find(:all)

Hi, what’s the name of your table if you turned pluralize off?

-Conrad

I found the problems, it was in methos list. I make thus:

@clientes_pages, @clientes = paginate :clientes,
  :conditions => ['usuario_id = ?', session[:usuario_id]],
  :per_page => 20

for

@clientes_pages, @clientes = paginate :clientess,
  :conditions => ['usuario_id = ?', session[:usuario_id]],
  :per_page => 20

I changed :clientes for :clientess <<<<< ahuhuhauaha…

thank