Skip to content
代码片段 群组 项目
用户头像
Doug Stull 编辑于
- add rubocop to lint on use of Current.organization outside
  of approved app layers.
- see https://gitlab.com/gitlab-org/gitlab/-/issues/442751 for
  details

```
      # # bad
      # class SomeService
      #   def execute
      #     do_something_with(Current.organization)
      #   end
      # end
      #
      # # good
      # class SomeController < ApplicationController
      #   def create
      #     response = SomeService.new(organization: Current.organization).execute
      #   end
      # end
      #
      # class SomeService
      #   def initialize(organization:)
      #     @organization = organization
      #   end
      #
      #   def execute
      #     do_something_with(@organization)
      #   end
      # end
```
3e3e7e34
历史
代码所有者
将用户和群组指定为特定文件更改的核准人。 了解更多。
名称 最后提交 最后更新
..