Hello, ''m new to Rails... ''m using Agile Web Development with Rails as a reference book. I have a table named products and a model named product I used following code in a controller admin class AdminController < ApplicationController scaffold :product end when I start server and navigate to the url http://localhost:3000/admin, I get follow error... NoMethodError in AdminController#index undefined method `scaffold'' for AdminController:Class this means I ''ve not defined an INDEX Method in controller... but the book doesnt say anything regarding this.... Does that mean "scaffold" handles everything? Any clue to this problem??? Thanks :) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
http://tpope.us/rubyonrailsfaq.html On Thu, May 8, 2008 at 3:30 PM, Ashit Vora <a.k.vora-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hello, > ''m new to Rails... > ''m using Agile Web Development with Rails as a reference book. > > I have a table named products and a model named product > > I used following code in a controller admin > > class AdminController < ApplicationController > scaffold :product > end > > when I start server and navigate to the url http://localhost:3000/admin, > I get follow error... > > NoMethodError in AdminController#index > > undefined method `scaffold'' for AdminController:Class > > > this means I ''ve not defined an INDEX Method in controller... but the > book doesnt say anything regarding this.... > Does that mean "scaffold" handles everything? > > Any clue to this problem??? > > Thanks :) > > >-- Ryan Bigg http://www.frozenplague.net Feel free to add me to MSN and/or GTalk as this email. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hello Ashit, class AdminController < ApplicationController scaffold :product end what u tried to create using the above code and also i think u can access my giving http://localhost:3000/product <http://localhost:3000/admin>, rite? regards, sumesh On Thu, May 8, 2008 at 11:30 AM, Ashit Vora <a.k.vora-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hello, > ''m new to Rails... > ''m using Agile Web Development with Rails as a reference book. > > I have a table named products and a model named product > > I used following code in a controller admin > > class AdminController < ApplicationController > scaffold :product > end > > when I start server and navigate to the url http://localhost:3000/admin, > I get follow error... > > NoMethodError in AdminController#index > > undefined method `scaffold'' for AdminController:Class > > > this means I ''ve not defined an INDEX Method in controller... but the > book doesnt say anything regarding this.... > Does that mean "scaffold" handles everything? > > Any clue to this problem??? > > Thanks :) > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Sumesh S wrote:> Hello Ashit, > > class AdminController < ApplicationController > scaffold :product > end > > what u tried to create using the above code and also i think u can > access my > giving > > http://localhost:3000/product <http://localhost:3000/admin>, rite? > > regards, > sumeshI encounter the same problem while reading books agile web dev.I think u try script/generate scaffold model attribute:datatype -- 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 -~----------~----~----~----~------~----~------~--~---