diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb index ee9885a1f..5f4142a11 100644 --- a/app/helpers/search_helper.rb +++ b/app/helpers/search_helper.rb @@ -6,6 +6,7 @@ module SearchHelper end experiments.uniq end + def sub_results(el) elements = [] el.each do |m| diff --git a/app/models/protocol.rb b/app/models/protocol.rb index 80813004a..385dcdd5e 100644 --- a/app/models/protocol.rb +++ b/app/models/protocol.rb @@ -147,15 +147,15 @@ class Protocol < ActiveRecord::Base end def linked_modules - MyModule.joins(:protocols).where("protocols.parent_id = ?", id) + MyModule.joins(:protocols).where('protocols.parent_id = ?', id) end def linked_experiments - Experiment.where("id IN (?)", linked_modules.pluck(:experiment_id).uniq) + Experiment.where('id IN (?)', linked_modules.pluck(:experiment_id).uniq) end - def linked_projects - Project.where("id IN (?)", linked_experiments.pluck(:project_id).uniq) + def linked_projects + Project.where('id IN (?)', linked_experiments.pluck(:project_id).uniq) end def self.new_blank_for_module(my_module)