diff --git a/app/controllers/institutions_controller.rb b/app/controllers/institutions_controller.rb index c076847269..fc2c3654d3 100644 --- a/app/controllers/institutions_controller.rb +++ b/app/controllers/institutions_controller.rb @@ -24,6 +24,7 @@ def show # format.json { render layout: false, json: JSON.parse(JbuilderTemplate.new(view_context).api_format!(@institution).target!) } #format.json { render json: @institution } #normal json format.json {render json: @institution, include: [params[:include]]} + format.rdf { render template: 'rdf/show' } end end diff --git a/app/models/institution.rb b/app/models/institution.rb index b44f65504f..70efb97b2d 100644 --- a/app/models/institution.rb +++ b/app/models/institution.rb @@ -1,5 +1,4 @@ class Institution < ApplicationRecord - acts_as_yellow_pages auto_strip_attributes :web_page, :title diff --git a/lib/seek/rdf/jerm_vocab.rb b/lib/seek/rdf/jerm_vocab.rb index db8a381d1a..bfd34bdc87 100644 --- a/lib/seek/rdf/jerm_vocab.rb +++ b/lib/seek/rdf/jerm_vocab.rb @@ -37,7 +37,8 @@ def self.defined_types Investigation => :Investigation, Publication => :Publication, Strain => :Strain, - Sample => :Sample + Sample => :Sample, + Institution => :Institution } end diff --git a/test/unit/util_test.rb b/test/unit/util_test.rb index 557296b7ed..5605ca1281 100644 --- a/test/unit/util_test.rb +++ b/test/unit/util_test.rb @@ -34,7 +34,7 @@ def teardown test 'rdf capable types' do types = Seek::Util.rdf_capable_types expected = %w[Assay DataFile Investigation Model ObservationUnit Organism Person Programme Project Publication -Sample Sop Strain Study] +Sample Sop Strain Study Institution] assert_equal expected, types.collect(&:name).sort end