Synced
Synced is a Rails Engine that helps you keep local models synchronized with their BookingSync representation.
Note: This synchronization is in one way only, from BookingSync to your application. If you want to do a 2 way synchronization, you will need to implement it yourself using BookingSync-API
Requirements
This engine requires BookingSync API >= 0.0.17, Rails >= 4.0.0 and Ruby >= 2.0.0.
Documentation
API documentation is available at rdoc.info.
Installation
Synced works with BookingSync API 0.0.17 onwards, Rails 4.0 onwards and Ruby 2.0 onwards. To get started, add it to your Gemfile with:
gem 'synced'
Then run the installer to copy the migrations,
rake synced:install:migrations
Then, generate a migration to add Synced fields for the model you want to synchronize:
Example:
rails g migration AddSyncedFieldsToRentals synced_id:integer:index synced_data:text \
synced_updated_at:datetime
and migrate:
rake db:migrate
And include Synced::HasSyncedData in the model you want to keep in sync:
Example:
class Rental < ActiveRecord::Base
include Synced::HasSyncedData
end