Class: Log::DbLog

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/log/db_log.rb

Instance Method Summary collapse

Instance Method Details

#contextObject



10
11
12
# File 'app/models/log/db_log.rb', line 10

def context
  ActiveSupport::JSON.decode(self[:context] || "{}").with_indifferent_access
end

#context=(hash = {}) ⇒ Object



6
7
8
# File 'app/models/log/db_log.rb', line 6

def context=(hash = {})
  self[:context] = hash.to_json
end