Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

problem with "date" attribute in data tables

I Have a form that is asking for a persons birthday, under my database I am using the t.date = "birthday". and my form everything displays properly. however when I input the date and hit submit the date is not saved in the database. is there something else that needs to be done in order to store a date into a data table? all my strings are being saved fine, so does anyone know why a date wouldn't work?

thanks, Dave

Kang-Kyu Lee
Kang-Kyu Lee
52,169 Points

Can we see your migration file has that birthday column?

2 Answers

It seems like you're not allowing this parameter in mass assignments. Are you using Rails 3 or Rails 4?

Thanks for posting back, I dropped my db and then migrated it again, now it works