On Jul 16, 1:08 pm, Xavier Lange <[EMAIL PROTECTED]> wrote: > I upgraded from 2.0.2 to 2.2.0 and I noticed that > Sequel::Model#set_with_params returns a hash and not a model whereas, > I believe, before it returned the instance of the model (that's how my > webapp code worked, at least). Is this the proper behavior? To me it > makes sense that set_with_params should update the values of the model > and return the model. Without committing the changes to the database, > of course.
The return value of Model#set (#set_with_params is an alias) was never specified, so you were relying on undefined behavior. That being said, I don't see a problem with specifying the behavior now and making the set* methods return self. The change will need to be made in Model#set_restricted. If you want it changed, please submit a patch with specs and I'll go ahead and apply it. Jeremy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en -~----------~----~----~----~------~----~------~--~---
