Browse Source

Fix announcements column name and add empty placeholder

Chris Oliver 7 years ago
parent
commit
213df0d0ad

+ 1 - 1
app/controllers/announcements_controller.rb

@@ -8,6 +8,6 @@ class AnnouncementsController < ApplicationController
   private
 
     def mark_as_read
-      current_user.update(last_read_announcements_at: Time.zone.now)
+      current_user.update(announcements_last_read_at: Time.zone.now)
     end
 end

+ 4 - 0
app/views/announcements/index.html.erb

@@ -19,4 +19,8 @@
       </div>
     </div>
   <% end %>
+
+  <% if @announcements.empty? %>
+    <div>Exciting stuff coming very soon!</div>
+  <% end %>
 </div>