Showing posts with label Ruby. Show all posts
Showing posts with label Ruby. Show all posts

Thursday, December 14, 2006

update_attributes returns "false"

Today we had a big problem with Ruby. We tried to update all the database fields of a user by a simple form. Ruby refused to do that and the only thing he send back to us in the event result was "false".

Normally Ruby gives back a nice fault message so our thought was that the problem was in Flex. After 1 hour and we changed everything on the Flex side nothing was changed. Then we when't in the code of Ruby.

2 hours later we finally found the problem. The problem wasn't in Flex and wasn't in the Service that we used to update the user. The problem was that we had this line in our model

validates_presence_of :name


But the database field name wasn't anymore in our Users table. We will never forget what we have to check first the next time if we get a "False"