admin/logs viewer implemented

This commit is contained in:
Christoph Haas 2018-08-09 18:24:28 +02:00
parent 79bf7a2276
commit b1dbcef80b
8 changed files with 27 additions and 15 deletions

View file

@ -10,7 +10,7 @@ class Log < ApplicationRecord
validates :level, inclusion: { in: ['info', 'error'] }
default_scope {
order('created_at ASC')
order('id DESC')
}
def self.log(message, section='frontend', level='info')