From 0d1dd74f0223492c71c1ca319683cce8f989f807 Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Tue, 14 Apr 2020 18:17:54 +0200 Subject: [PATCH] Fix typo --- app/controllers/my_module_repositories_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/my_module_repositories_controller.rb b/app/controllers/my_module_repositories_controller.rb index 5bd5b1955..7b0b92890 100644 --- a/app/controllers/my_module_repositories_controller.rb +++ b/app/controllers/my_module_repositories_controller.rb @@ -41,13 +41,13 @@ class MyModuleRepositoriesController < ApplicationController private def load_my_module - @my_module = MyModule.find(params[:my_module_id]) + @my_module = MyModule.find_by(id: params[:my_module_id]) render_404 unless @my_module end def load_repository - @repository = Repository.find(params[:id]) - ender_404 unless @repository + @repository = Repository.find_by(id: params[:id]) + render_404 unless @repository end def check_my_module_view_permissions