BookingSync / synced

Keep your BookingSync Application synced with BookingSync
MIT License
3 stars 2 forks source link

Synced::Model.synchronize should not modify options argument, but clone the options and modify new object #45

Closed Azdaroth closed 7 years ago

Azdaroth commented 9 years ago

Current behavior may lead to some pretty unexpected bugs, e.g. such code:

sync_options = { scope: Account.first }
Booking.synchronize(sync_options)

would raise ArgumentError when running more than one time, because the sync_options hash has been modified. Best to clone the options hash and work with new object.

StoneFrog commented 7 years ago

@Mandaryn I think this has been solved by #53 so can be closed.