app/models/announcement.rb in paul_revere-1.1 vs app/models/announcement.rb in paul_revere-1.2

- old
+ new

@@ -1,9 +1,11 @@ class Announcement < ActiveRecord::Base - attr_accessible :body + if Rails::VERSION::MAJOR < 4 + attr_accessible(:body) + end def self.current - first(:order => 'created_at DESC') || new + order('created_at desc').first || new end def exists? !new_record? end