BookingSync/synced — pull request #25 by wijet (2014-11-13 09:10:16+00:00)
Title: Synchronizer removes all records

```ruby
class Rental < ActiveRecord::Base
synced associations: [:photos, :rentals_amenities], local_attributes: [:position, :published_at],
remove: true
end

Rental.synchronize(Account.first)
```

Running the synchronization removes all rentals, running again creates them back, and this loops.

The problem is with the `remove_relation` method. When synchronizing the root collection, no request has been performed, so it goes to the else branch and removes all records not having ids that the remote returned. The remote returns only updated records, which can be an empty array, so it would remove all records.