Class: Consent::History

Inherits:
ApplicationRecord show all
Defined in:
app/models/consent/history.rb

Class Method Summary collapse

Class Method Details

.record(command, permission) ⇒ Object



13
14
15
16
17
18
# File 'app/models/consent/history.rb', line 13

def self.record(command, permission)
  create!(
    **permission.slice(:role_id, :subject, :action, :view),
    command: command.to_s
  )
end