I'm a Ruby on Rails and MySQL newbie, trying to get started with the
lynda.com training, so excuse my ignorance. Using Ruby 1.8.6, Rails
1.1.6, and mysql 14.12 Distrib 5.051b for Win32 on a Vista machine (not
using the current version of rails as the lynda.com training was using
1.1.6 and using the newest version, some of the examples weren't working
(scafolding for example).
I'm just starting to learn how to work with databases. I have a mysql
database up and running with an albums table, and have the following
code in my controller:
@album = Album.new
@album.title = 'Aftermath'
@album.artist = 'The Rolling Stones'
@album.genre = 'Rock'
@album.release_date = '1966-01-01 12:00:00'
render(:action => 'show_album')
I have had no problem reading from the database through other code, but
when I do this, and then look at the variables (in my render),
album.release_date shows up as null. If I change the input date to a
Time.now(), it works fine. (Before I had an @album.save and was getting
an error that the release_date was null (and can't be as defined in the
Is there a reason why I can't insert the release_date of the album?
Thanks for the help, and again, forgive me if this should be obvious to