aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Donnet2018-04-10 09:49:15 +0200
committerLuc Donnet2018-04-10 09:49:15 +0200
commite8c2d5e92ba321bb8f12d48055fbe1001a81405b (patch)
treeed8958c99324372449d84349434d067d7b1fbe61
parent5da26542d56c9035f6b74a20d22a84105cfc1133 (diff)
downloadchouette-core-6367-remove-papertrail.tar.bz2
Delete unused include MetadataSupport because all class inherit from ApplicationModel Refs #6327 @16367-remove-papertrail
-rw-r--r--app/models/api/v1/api_key.rb2
-rw-r--r--app/models/calendar.rb1
-rw-r--r--app/models/compliance_check_set.rb3
-rw-r--r--app/models/compliance_control_set.rb3
4 files changed, 3 insertions, 6 deletions
diff --git a/app/models/api/v1/api_key.rb b/app/models/api/v1/api_key.rb
index 890e8e175..e6ceb977a 100644
--- a/app/models/api/v1/api_key.rb
+++ b/app/models/api/v1/api_key.rb
@@ -1,8 +1,8 @@
module Api
module V1
class ApiKey < ::ApplicationModel
- include MetadataSupport
has_metadata
+
before_create :generate_access_token
belongs_to :referential, :class_name => '::Referential'
belongs_to :organisation, :class_name => '::Organisation'
diff --git a/app/models/calendar.rb b/app/models/calendar.rb
index 4b0ff8379..39e2b2cff 100644
--- a/app/models/calendar.rb
+++ b/app/models/calendar.rb
@@ -7,7 +7,6 @@ class Calendar < ApplicationModel
include PeriodSupport
include ApplicationDaysSupport
include TimetableSupport
- include MetadataSupport
has_metadata
belongs_to :organisation
diff --git a/app/models/compliance_check_set.rb b/app/models/compliance_check_set.rb
index c4da2789d..8b1dbdd68 100644
--- a/app/models/compliance_check_set.rb
+++ b/app/models/compliance_check_set.rb
@@ -1,7 +1,6 @@
class ComplianceCheckSet < ApplicationModel
extend Enumerize
- include MetadataSupport
-
+
has_metadata
belongs_to :referential
diff --git a/app/models/compliance_control_set.rb b/app/models/compliance_control_set.rb
index e44744381..4f0f86d08 100644
--- a/app/models/compliance_control_set.rb
+++ b/app/models/compliance_control_set.rb
@@ -1,7 +1,6 @@
class ComplianceControlSet < ApplicationModel
- include MetadataSupport
-
has_metadata
+
belongs_to :organisation
has_many :compliance_control_blocks, dependent: :destroy
has_many :compliance_controls, dependent: :destroy