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"? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
El 03/01/2007, a las 20:33, Marcelo Junior 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 Bernal Ordovás <jbernal-OqA2i3GDl8k@public.gmane.org> http://amedias.org/ [ES] http://koke.amedias.org/ [EN] Warp Networks http://www.warp.es/ María de Luna 11, 50018 Zaragoza, España --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I already am using Clientes.find(:all) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi, what''s the name of your table if you turned pluralize off? -Conrad On 1/3/07, Marcelo Junior <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > I already am using Clientes.find(:all) > > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---