Listing announcements

<%= link_to 'New announcement', new_announcement_path %> <% for announcement in @announcements %> <% @announcement = announcement %> <% end %>
Updated Announcement Author Published
<%= time_ago_in_words announcement.updated_at %> <% if !announcement.title.blank? %> Title: <%=h announcement.title %>
<% end %> <% if !announcement.notes.blank? %> Notes: <%=h announcement.notes %>
<% end %> <%=h announcement.body %>
<%=h announcement.author %> <%= 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) %> <%= link_to 'Destroy', announcement, :confirm => 'Are you sure?', :method => :delete %>

<%= link_to 'New announcement', new_announcement_path %>