浏览代码

Fix announcements column name and add empty placeholder

Chris Oliver 7 年之前
父节点
当前提交
213df0d0ad
共有 2 个文件被更改,包括 5 次插入1 次删除
  1. 1 1
      app/controllers/announcements_controller.rb
  2. 4 0
      app/views/announcements/index.html.erb

+ 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>