On Aug 12, 3:36 pm, Dave Aronson <googlegroups2d...@davearonson.com> wrote: > On Thu, Aug 12, 2010 at 15:31, Scott Le gendre <li...@ruby-forum.com> wrote: > > >> Did you have a name column in your model? > > > Well, all I have in my model is the following: > > > ******************************************* > > > class Artist < ActiveRecord::Base > > > has_many :albums > > > end > > ******************************************* > > That may be all you've specified in the model file, but have you any > additional columns in the database? If you had some, then when you > generated the scaffolding, I think it would have put them in the view. > Try a new project, similar in most respects, but make some data > columns, including some kind of name/title/whatever, before you > generate the scaffold. Then compare the two. >
Regenerate the scaffold. I believe you're following an old tutorial, scaffolds are a lot simpler than trying to attach tables together and hoping they'll stick. Take note of Colin's comment. $ script/generate scaffold album title:string artist:string price:decimal then take a look in /db/migrate/StringOfNumbers_create_albums.rb Finally, try running it. > -Dave > > -- > Specialization is for insects. -RAH | Have Pun, Will Babble! -me > Programming Blog:http://codosaur.us| Work:http://davearonson.com > Leadership Blog: http://dare2xl.com| Play:http://davearonson.net > * * * * * WATCH THIS SPACE * * * * * | Ruby:http://mars.groupsite.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-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.