diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index f01d810..e5b9bed 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -249,7 +249,7 @@ #subset guidance that belong to the institution unless institution.nil? then authorize Project - optional_gg = GuidanceGroup.where("optional_subset = ? && organisation_id = ?", true, institution.id) + optional_gg = GuidanceGroup.where("optional_subset = ? AND organisation_id = ?", true, institution.id) optional_gg.each do|optional| guidance_groups[optional.id] = optional.name end @@ -272,7 +272,7 @@ #If template belongs to a funder and that funder has subset guidance display then. if !template.nil? && template.organisation.organisation_type.name == constant("organisation_types.funder") then - optional_gg = GuidanceGroup.where("optional_subset = ? && organisation_id = ?", true, template.organisation_id) + optional_gg = GuidanceGroup.where("optional_subset = ? AND organisation_id = ?", true, template.organisation_id) optional_gg.each do|optional| guidance_groups[optional.id] = optional.name end @@ -335,7 +335,7 @@ guidance_groups = [] #subset guidance that belong to an institution - optional_gg = GuidanceGroup.where("optional_subset = ? && organisation_id IS NOT NULL", true) + optional_gg = GuidanceGroup.where("optional_subset = ? AND organisation_id IS NOT NULL", true) optional_gg.each do|optional| guidance_groups << optional.id @@ -347,7 +347,7 @@ end # If template belongs to a funder and is an optional_subset - optional_gg = GuidanceGroup.where("optional_subset = ? && organisation_id IN (?)", true, orgs_of_type(constant("organisation_types.funder"))) + optional_gg = GuidanceGroup.where("optional_subset = ? AND organisation_id IN (?)", true, orgs_of_type(constant("organisation_types.funder"))) optional_gg.each do|optional| guidance_groups << optional.id end diff --git a/app/views/plans/_answer_form.html.erb b/app/views/plans/_answer_form.html.erb index 57198f7..8d67749 100644 --- a/app/views/plans/_answer_form.html.erb +++ b/app/views/plans/_answer_form.html.erb @@ -165,7 +165,7 @@