Okay, so we’ve pushed live our first Backbone JS app and now we have new issue.
Apparently when I initially load models for comments and reviews, they have “created_at” attributes that contain time stamp of when they were added. When I edit a comment and then do model.sync(), it passes “created_at” back to the server. Now RoR app trips out about it, and as our Rails dev is telling me, I can’t at no circumstance pass “created_at” back to the server and that it’s calculated for display only.
Now something has to give. Either I have to hack Backbone and delete some attributes before sync() or something has to be done on Rails side.
What is your suggestion for the soluton?
And in any case, what can be done to NOT pass some attributes during model.sync()? I would really appreciate your help.
You can add to your model: