Skip to content

Commit

Permalink
supports_mixin: drop unused COMMON_FEATURES and fix presence
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrock committed Feb 7, 2024
1 parent 077fb9f commit 078b3a9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/models/mixins/supports_feature_mixin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
module SupportsFeatureMixin
extend ActiveSupport::Concern

COMMON_FEATURES = %i[create delete destroy refresh_ems update].freeze

# Whenever this mixin is included we define all features as unsupported by default.
# This way we can query for every feature
included do
Expand All @@ -58,7 +56,7 @@ module SupportsFeatureMixin
end

def self.reason_or_default(reason = nil)
reason.present? ? reason : _("Feature not available/supported")
reason.presence || _("Feature not available/supported")
end

# query instance for the reason why the feature is unsupported
Expand Down

0 comments on commit 078b3a9

Please sign in to comment.