@@ -0,0 +1,17 @@
+class Announcement < ActiveRecord::Base
+  # Attributes
+  attr_accessible :announceable_id, :announceable_type, :ends_at, :message
+
+  # Associations
+  belongs_to :announceable, polymorphic: true
+
+  # Validations
+  validates :announceable_id, presence: true
+  validates :announceable_type, presence: true
+  validates :ends_at, presence: true
+  validates :message, presence: true
+
+  def self.current
+    where('ends_at > ?', Time.now).order('ends_at ASC').first
+  end
+end
Yea, I had started out with "latest" as the name, but that didn't really match the logic. Also, I kind of like that the implementation of "current" is sort of hidden from the caller. Feels like I should just be able to ask for my current announcement and not worry about what that means. Make sense?