Sha256: 0d5f2ab64b4f2b6acbeec1c4303340cc6340946b642d1792571ab9e9d3b0b14a

Contents?: true

Size: 153 Bytes

Versions: 8

Compression:

Stored size: 153 Bytes

Contents

class Announcement < ActiveRecord::Base
  def self.current
    first(:order => 'created_at DESC') || new
  end

  def exists?
    !new_record?
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
paul_revere-1.0 app/models/announcement.rb
paul_revere-0.2.1 app/models/announcement.rb
paul_revere-0.2.0 app/models/announcement.rb
paul_revere-0.1.5 app/models/announcement.rb
paul_revere-0.1.4 app/models/announcement.rb
paul_revere-0.1.3 app/models/announcement.rb
paul_revere-0.1.2 app/models/announcement.rb
paul_revere-0.1.1 app/models/announcement.rb