> Is there any 'best practice' way of doing this sort of thing? > > For example, do I use an after :create hook and then call self.save at > the end? > eg > after :create do > self.url ='/mysite/' << self.id.to_s > self.save > end >
Well the 'best practice' way is definitely not this way because it returns false - the resource is created but then is not saved afterwards and the url property is considered 'dirty' (what does that actually mean?? I'm puzzled by this! DAZ -- 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.