diff options
| author | Zog | 2018-03-30 16:15:48 +0200 |
|---|---|---|
| committer | Zog | 2018-04-09 16:58:23 +0200 |
| commit | bf745bf731237f4d405065de5d386eaee2a2d131 (patch) | |
| tree | 584b5d6748deb095e399117c1f443bd7febed8d1 /app/models/api | |
| parent | 745428deb8e0df2c7c8a991ab8a5f5231e6d6c7f (diff) | |
| download | chouette-core-bf745bf731237f4d405065de5d386eaee2a2d131.tar.bz2 | |
Refs #6367; Add metadata to other versioned models
Diffstat (limited to 'app/models/api')
| -rw-r--r-- | app/models/api/v1/api_key.rb | 6 |
1 files changed, 3 insertions, 3 deletions
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 - |
