On Apr 7, 11:45 am, DAZ <daz4...@gmail.com> wrote: > I still don't see why the code with self.save! works, but self.save > doesn't - there aren't any validations or callbacks from what you've > both said, both of these methods should work, but self.save just fails > silently (the new url field is not saved, but everything else is).
It's because #create calls #save under the hood and the entire procedure is called within a block that prevents #save from being called more than once to avoid infinite loops. That's why when you call #save! it works. I think this is something we really need to improve. I know that Dan wants to re-work the Hooks in general, we've already added that to 1.2 roadmap... Cheers # solnic -- You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to datamapper@googlegroups.com. To unsubscribe from this group, send email to datamapper+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/datamapper?hl=en.