Module: Banzai::CrossProjectReference
- Included in:
- Filter::AbstractReferenceFilter
- Defined in:
- lib/banzai/cross_project_reference.rb
Overview
Common methods for ReferenceFilters that support an optional cross-project reference.
Instance Method Summary collapse
-
#parent_from_ref(ref) ⇒ Object
Given a cross-project reference string, get the Project record.
Instance Method Details
#parent_from_ref(ref) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/banzai/cross_project_reference.rb', line 16 def parent_from_ref(ref) return context[:project] || context[:group] unless ref return context[:project] if context[:project]&.full_path == ref Project.find_by_full_path(ref) end |