diff options
Diffstat (limited to 'app/models/concerns/blob_active_model.rb')
-rw-r--r-- | app/models/concerns/blob_active_model.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/app/models/concerns/blob_active_model.rb b/app/models/concerns/blob_active_model.rb new file mode 100644 index 00000000000..89157e90e34 --- /dev/null +++ b/app/models/concerns/blob_active_model.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# To be included in blob classes which are to be +# treated as ActiveModel. +# +# The blob class must respond_to `project` +module BlobActiveModel + extend ActiveSupport::Concern + + class_methods do + def declarative_policy_class + 'BlobPolicy' + end + end + + def to_ability_name + 'blob' + end +end |