diff --git a/app/controllers/experiments_controller.rb b/app/controllers/experiments_controller.rb index 9879ae5de..1ef63c8b6 100644 --- a/app/controllers/experiments_controller.rb +++ b/app/controllers/experiments_controller.rb @@ -10,13 +10,13 @@ class ExperimentsController < ApplicationController def new @experiment = Experiment.new respond_to do |format| - format.json { - render json:{ - html: render_to_string( { - partial: "new_modal.html.erb" - }) + format.json do + render json: { + html: render_to_string( + partial: 'new_modal.html.erb' + ) } - } + end end end diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index d6edad815..a9b04b088 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -11,7 +11,8 @@ class ProjectsController < ApplicationController :samples_index] before_action :check_view_notifications_permissions, only: [ :notifications ] before_action :check_edit_permissions, only: [ :edit ] - before_action :check_experiment_archive_permissions, only: [:experiment_archive] + before_action :check_experiment_archive_permissions, + only: [:experiment_archive] filter_by_archived = false @@ -306,9 +307,7 @@ class ProjectsController < ApplicationController end def check_experiment_archive_permissions - unless can_view_project_archive(@project) - render_403 - end + render_403 unless can_view_project_archive(@project) end def choose_layout