All Versions
Latest Version
Avg Release Cycle
91 days
Latest Release
2962 days ago

Changelog History
Page 1

  • v0.5.0

    May 04, 2016
  • v0.4.0

    February 06, 2016
  • v0.3.5 Changes

    January 06, 2015
    • โœ‚ Removed unnecessary call to respond_to since responders have been removed from Rails.
  • v0.3.4 Changes

    January 06, 2015
    • #squish generated HTML
    • ๐Ÿ›  Fix bug when using sync @resource with the :scope option
  • v0.3.3

    December 30, 2014
  • v0.3.0 Changes

    March 03, 2014

    ๐Ÿš€ This release focuses on improving and extending the model DSL for setting up automatic syncing in advanced use cases.

    • โž• Adds the ability for advanced channel scoping

    There were multiple feature requests asking for a way to sync differently scoped lists of the same model automatically and interdependently (e.g all todos of a user and all todos of a project). This can now be accomplished by explicitly defining scopes on the model via the new sync_scope method:

      class Todo < ActiveRecord::Base
        belongs_to :project
        belongs_to :user
        sync :all
        sync_scope :by_user(user), -> { where(user_id: }
        sync_scope :by_project(project), -> { where(project_id: }

    and then use these scopes to narrow the rendering of sync partials like this:

      <%= sync partial: "todo", resource: Todo.by_user(@user) %>
      <%= sync_new partial: "todo", resource:, scope: Todo.by_user(@user) %>

    Please take a look at the docs and the readme for a more thorough explanation and examples on how to use this new feature.

    • โž• Adds the ability to explicitly update parent associations via sync_touch
    Breaking Changes:
    • ๐Ÿ”€ If you're using the scope feature to narrow the syncing of new records in the sync_new call, you will now have to add this scope when calling the sync helper method as well:
      <%= sync partial: 'todo_comment', collection: @comments, scope: @todo %>
      <%= sync_new partial: 'todo_comment', resource:, scope: @todo %>

    If you're in addition using the controller way of manually syncing partials, you will now also have to add the scope parameter to the sync_destroy call like this:

      sync_destroy @comment, scope: @comment.todo

    Why is this?

    Before this version there was only a global destroy channel for every record, so an unscoped sync_destroy call was just enough to remove all partials from all subscribed clients when a record has been destroyed. As of 0.3.0 the destroy channel will be used not only to remove partials when a record is destroyed, but also when partials for that record need to be added to/removed from different sets throughout the application when it is updated.

    • โšก๏ธ The :scope parameter for the sync method has been replaced with :default_scope. Make sure you update your code accordingly. If you're using the default scope feature, be sure to alway add the corresponding option to your views like this:
      class Todo < ActiveRecord::Base
        belongs_to :organization
        sync :all, default_scope: :organization
      <%= sync partial: "todo", resource: @todos, default_scope: @organization %>
      <%= sync_new partial: "todo", resource:, default_scope: @organization %>
    • โšก๏ธ The parent model defined by the :default_scope parameter will no longer be automatically updated via sync. Please use the new explicit sync_touch method instead.

    Old Syntax:

      class Todo < ActiveRecord::Base
        belongs_to :project
        belongs_to :user
        sync :all, scope: :project

    New Syntax:

      class Todo < ActiveRecord::Base
        belongs_to :project
        belongs_to :user
        sync :all, default_scope: :project
        sync_touch :project, :user

    This will sync all partials of the parent model project and user, whenever a todo is created/updated/deleted.

  • v0.2.7 Changes

  • v0.2.6

    September 12, 2013
  • v0.2.3 Changes

    June 30, 2013
    • ๐Ÿ›  Fixed Turbolinks issue where page:restore events no longer evaluate script tags in the body. The workaround re-evaluates all sync sript tags on page restore.
  • v0.2.2

    May 29, 2013