I understand that scaffolding has been removed in 2.x but is available as a generated script. I''ve generated the scaffold and inserted some data into the DB by hand (1 record). The scaffold pages ( http://ruby.geeklan.com/public/products/ ) don''t show anything and the log file doesn''t indicate anything (useful to me, anyway, looks successful all the way through). Am I missing something obvious or is there other information i can provide? I''m an experienced PHP Developer (10+ years), but this is totally new to me. Even the basics barely apply. -- 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 -~----------~----~----~----~------~----~------~--~---
Your form is empty for your new products link. Are you sure you put the data in the right table? Try doing <%= Product.count %> which will give a number of how many records are in the products table if you have a Product model On Dec 12, 2007 9:44 AM, Geoff W. <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > I understand that scaffolding has been removed in 2.x but is available > as a generated script. > > I''ve generated the scaffold and inserted some data into the DB by hand > (1 record). > > The scaffold pages ( http://ruby.geeklan.com/public/products/ ) don''t > show anything and the log file doesn''t indicate anything (useful to me, > anyway, looks successful all the way through). > > Am I missing something obvious or is there other information i can > provide? > > I''m an experienced PHP Developer (10+ years), but this is totally new to > me. Even the basics barely apply. > -- > Posted via http://www.ruby-forum.com/. > > > >-- Ryan Bigg http://www.frozenplague.net --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Geoff W. wrote:> I understand that scaffolding has been removed in 2.x but is available > as a generated script. > > I''ve generated the scaffold and inserted some data into the DB by hand > (1 record). > > The scaffold pages ( http://ruby.geeklan.com/public/products/ ) don''t > show anything and the log file doesn''t indicate anything (useful to me, > anyway, looks successful all the way through). > > Am I missing something obvious or is there other information i can > provide? > > I''m an experienced PHP Developer (10+ years), but this is totally new to > me. Even the basics barely apply.check if you have a non NULL field in the database. -- 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 -~----------~----~----~----~------~----~------~--~---
This is my current table layout: CREATE TABLE `products` ( `id` int(11) NOT NULL auto_increment, `title` varchar(100) default NULL, `description` text, `image_url` varchar(200) default NULL, `price` decimal(10,2) default NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ; I''d assume this should work, it''s out of the Agile Web Dev w/ Rails book (Tad old, but I''ve managed to get this far). -- 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 -~----------~----~----~----~------~----~------~--~---
Aha! So you''ve gone script/generate scaffold product! The correct way is to define which fields you would like defined within the scaffold: script/generate scaffold title:string description:text image_url:string price:integer On Dec 12, 2007 10:16 AM, Geoff W. <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > This is my current table layout: > > CREATE TABLE `products` ( > `id` int(11) NOT NULL auto_increment, > `title` varchar(100) default NULL, > `description` text, > `image_url` varchar(200) default NULL, > `price` decimal(10,2) default NULL, > PRIMARY KEY (`id`) > ) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ; > > I''d assume this should work, it''s out of the Agile Web Dev w/ Rails book > (Tad old, but I''ve managed to get this far). > -- > Posted via http://www.ruby-forum.com/. > > > >-- Ryan Bigg http://www.frozenplague.net --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ryan Bigg wrote:> Your form is empty for your new products link.That''s what doesn''t make sense to me. I generated this using: scripts/generate scaffold Product I would assume the scaffold generation process would take care of the forms and general format of the page. Is this not true? Seems like that would defeat the purpose of even offering the ability to generate a scaffold if it doesn''t actually work. Looking at the Listing products page which was generated, it has nothing to show the product fields anywhere. I added a line as such: Product ID: <%= product.id %> And it does print the product ID. This looks like a bug to me. I can reproduce this when generating the scaffold for any table. -- 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 -~----------~----~----~----~------~----~------~--~---
It''s not a bug, it''s a "feature" of Rails 2.0. I wouldn''t encourage you to use script/generate scaffold anyway. On Dec 12, 2007 11:16 AM, Geoff W. <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Ryan Bigg wrote: > > Your form is empty for your new products link. > > > That''s what doesn''t make sense to me. I generated this using: > > scripts/generate scaffold Product > > I would assume the scaffold generation process would take care of the > forms and general format of the page. Is this not true? Seems like that > would defeat the purpose of even offering the ability to generate a > scaffold if it doesn''t actually work. > > Looking at the Listing products page which was generated, it has nothing > to show the product fields anywhere. > > I added a line as such: > > Product ID: <%= product.id %> > > And it does print the product ID. This looks like a bug to me. I can > reproduce this when generating the scaffold for any table. > -- > Posted via http://www.ruby-forum.com/. > > > >-- Ryan Bigg http://www.frozenplague.net --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ryan Bigg wrote:> Aha! So you''ve gone script/generate scaffold product! > > The correct way is to define which fields you would like defined within > the > scaffold: > > script/generate scaffold title:string description:text image_url:string > price:integer > > -- > Ryan Bigg > http://www.frozenplague.netI see now! Thank you very much, Mr. Bigg! This should help me greatly on my path to Enlightenment. Enrailsment? -- 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 -~----------~----~----~----~------~----~------~--~---