mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-09 22:23:28 +08:00
fixes hound
This commit is contained in:
parent
83034f705d
commit
4bce00ac61
2 changed files with 5 additions and 4 deletions
|
@ -6,6 +6,7 @@ module SearchHelper
|
|||
end
|
||||
experiments.uniq
|
||||
end
|
||||
|
||||
def sub_results(el)
|
||||
elements = []
|
||||
el.each do |m|
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue