Welcome to mirror list, hosted at ThFree Co, Russian Federation.

blob_active_model.rb « concerns « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 89157e90e34274d387446fd9f9b6363d666b247e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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