diff --git a/app/views/announcements/index.html.erb b/app/views/announcements/index.html.erb
--- a/app/views/announcements/index.html.erb
+++ b/app/views/announcements/index.html.erb
@@ -27,7 +27,7 @@
<%=h announcement.body %>
<%=h announcement.author %> |
- <%= check_box_tag :published, 1, announcement.published, class: 'bootstrap-switch', data: {size: 'small'} %> |
+ <%= check_box_tag :published, 1, announcement.published, { class: 'bootstrap-toggle', id: "published-#{announcement.id}", data: {remote: true, method: 'PUT', url: url_for(controller: :announcements, action: :toggle, id: announcement), size: 'small', toggle: 'toggle' } } %> |
<%= link_to 'Show', announcement %> |
<%= link_to 'Edit', edit_announcement_path(announcement) %> |