Class: Log
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Log
- Defined in:
- app/models/log.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.latest ⇒ Object
17 18 19 |
# File 'app/models/log.rb', line 17 def self.latest Log.first # default_scope sorts in descending order. end |
Instance Method Details
#some_content_present? ⇒ Boolean
21 22 23 |
# File 'app/models/log.rb', line 21 def some_content_present? errors.add(:content, :blank) if file.blank? && content.blank? end |