Sunday, November 21, 2010
ActiveRecord: Can't Retrieve value of Id after insert
Although there could be many problems (for example the record isn't actually saving), another problem I ran into is that you need to be using naming conventions. I was using 'Id' for my primary field name. That didn't work. Tried it with 'id' and everything began working well again.
Tuesday, February 23, 2010
Problem subtracting dates minus_without_duration
If you try subtracting dates that are really large (like in the year 2499) you will get the error minus_without_duration. make the dates more reasonable and everything works just fine.
Sunday, January 31, 2010
Rails Reserved Words
if you use words from this list as your column names you will get all kinds of grief and heartache. Be careful:
The only list I've found that had all the words I've run into problems with is here:
http://www.yup.com/articles/2007/01/31/no-reservations-about-keywords-in-ruby-on-rails
The only list I've found that had all the words I've run into problems with is here:
http://www.yup.com/articles/2007/01/31/no-reservations-about-keywords-in-ruby-on-rails
Subscribe to:
Posts (Atom)