UI not updating realtime
Opened this issue · 0 comments
faethonm commented
Hi Im trying to setup sync gem in my project but the ui is not updating real time
I am using Rails 5 beta 4,
In my gemfile i have
Sync
gem 'faye'
gem 'thin', require: false
gem 'sync'
class ListItemsController < ApplicationController
enable_sync
def create
@list = List.find(params[:id])
@list_item = @list.list_items.create(list_item_params)
@list_item.save
sync_new @list_item
redirect_to @list
end
show.html.erb
<%= sync partial: 'list_item', collection: @list.list_items %>
_list_item.html.erb
<%= best_in_place list_item, :name, :as => :input%>
The template is rendering but doesnt refresh automatically
Thank you