Skip to content
Snippets Groups Projects
Commit 57b1629c authored by Arnaud Levy's avatar Arnaud Levy
Browse files

wip

parent d8bb381e
No related branches found
No related tags found
No related merge requests found
......@@ -71,4 +71,9 @@ class Administration::Location < ApplicationRecord
def references
[]
end
# Un site n'a pas de site dépendant
def has_administration_locations?
false
end
end
......@@ -2,9 +2,14 @@ module Education::Program::WithLocations
extend ActiveSupport::Concern
included do
has_and_belongs_to_many :locations,
has_and_belongs_to_many :administration_locations,
class_name: 'Administration::Location',
foreign_key: :administration_location_id,
association_foreign_key: :education_program_id
alias_method :locations, :administration_locations
end
def has_administration_locations?
locations.any?
end
end
......@@ -107,6 +107,10 @@ class Research::Journal < ApplicationRecord
def has_education_diplomas?
false
end
def has_administration_locations?
false
end
def has_research_papers?
published_papers.published.any?
......
......@@ -92,6 +92,11 @@ class Research::Laboratory < ApplicationRecord
false
end
# TODO en fait un laboratoire peut avoir des locations mais il faut le coder
def has_administration_locations?
false
end
def has_research_papers?
false
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment