6 lines
260 B
Ruby
6 lines
260 B
Ruby
class DeployKey < Key
|
|
has_many :deploy_keys_projects, dependent: :destroy
|
|
has_many :projects, through: :deploy_keys_projects
|
|
|
|
scope :in_projects, ->(projects) { joins(:deploy_keys_projects).where('deploy_keys_projects.project_id in (?)', projects) }
|
|
end
|