From bf745bf731237f4d405065de5d386eaee2a2d131 Mon Sep 17 00:00:00 2001 From: Zog Date: Fri, 30 Mar 2018 16:15:48 +0200 Subject: Refs #6367; Add metadata to other versioned models --- app/models/api/v1/api_key.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/models/api') diff --git a/app/models/api/v1/api_key.rb b/app/models/api/v1/api_key.rb index 09c6f77ac..890e8e175 100644 --- a/app/models/api/v1/api_key.rb +++ b/app/models/api/v1/api_key.rb @@ -1,7 +1,8 @@ module Api module V1 - class ApiKey < ::ActiveRecord::Base - has_paper_trail + class ApiKey < ::ApplicationModel + include MetadataSupport + has_metadata before_create :generate_access_token belongs_to :referential, :class_name => '::Referential' belongs_to :organisation, :class_name => '::Organisation' @@ -47,4 +48,3 @@ module Api end end end - -- cgit v1.2.3