Im new to Ruby on rails. I have installed Instant rails. created my application called "Project". then ->> generated model for it called "device" then->>created a database called project_development and added a column to db/migrate/001_create_devices.rb. then->> run the rake db:migrate command. then->> i generated a controller called "project_controller" and wrote scaffold:device inside it. after that i tried to access the application at localhost:3000\project_controller but its giving error "undefined method `scaffold'' for ProjectControllerController:Class" Please help me out of it. Thanks in advance -- 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 -~----------~----~----~----~------~----~------~--~---
There might be a syntax error near the code where you turn on scaffolding. Would you mind posting the code near the area where you call scaffold? On Jan 28, 6:51 am, Supriya Agarwal <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Im new to Ruby on rails. > I have installed Instant rails. created my application called "Project". > then ->> generated model for it called "device" > then->>created a database called project_development and added a column > to db/migrate/001_create_devices.rb. > then->> run the rake db:migrate command. > then->> i generated a controller called "project_controller" and wrote > scaffold:device inside it. > after that i tried to access the application at > localhost:3000\project_controller but its giving error "undefined method > `scaffold'' for ProjectControllerController:Class" > > Please help me out of it. > > Thanks in advance > -- > Posted viahttp://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 -~----------~----~----~----~------~----~------~--~---
class ProjectControllerController < ApplicationController scaffold:device end where device is my model.. -- 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 -~----------~----~----~----~------~----~------~--~---
Supriya Agarwal wrote:> class ProjectControllerController < ApplicationController > scaffold:device > end > > > > where device is my model..stop scaffolding, especially when you are learning. -- 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 -~----------~----~----~----~------~----~------~--~---
There needs to be a space. scaffold :device scaffold is the name of the method, and :device is a symbol (prefixing : makes something a symbol in Ruby). (Sorry for the late reply!) On Jan 29, 1:55 am, Bl Jj <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Supriya Agarwal wrote: > > class ProjectControllerController < ApplicationController > > scaffold:device > > end > > > where device is my model.. > > stop scaffolding, especially when you are learning. > -- > Posted viahttp://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 -~----------~----~----~----~------~----~------~--~---
It is best not to use scaffolding at all and hand code things if you are trying to learn. On Feb 1, 2008 9:21 PM, Wyatt Greene <greenewm-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> > There needs to be a space. > > scaffold :device > > scaffold is the name of the method, and :device is a symbol > (prefixing : makes something a symbol in Ruby). > > (Sorry for the late reply!) > > On Jan 29, 1:55 am, Bl Jj <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > Supriya Agarwal wrote: > > > class ProjectControllerController < ApplicationController > > > scaffold:device > > > end > > > > > where device is my model.. > > > > stop scaffolding, especially when you are learning. > > -- > > Posted viahttp://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 -~----------~----~----~----~------~----~------~--~---