fixes hound

This commit is contained in:
Mojca Lorber 2016-09-02 11:54:20 +02:00
parent 83034f705d
commit 4bce00ac61
2 changed files with 5 additions and 4 deletions

View file

@ -6,6 +6,7 @@ module SearchHelper
end
experiments.uniq
end
def sub_results(el)
elements = []
el.each do |m|

View file

@ -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)