mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-04 03:36:44 +08:00
Fix 404 on move experiment
[fixes SCI-378]
This commit is contained in:
parent
5c8d669cac
commit
3e5e9aed22
2 changed files with 5 additions and 3 deletions
|
@ -106,7 +106,7 @@ class ExperimentsController < ApplicationController
|
|||
|
||||
# POST: clone_experiment(id)
|
||||
def clone
|
||||
project = Project.find_by_id(params[:experiment][:project_id])
|
||||
project = Project.find_by_id(params[:experiment].try(:[], :project_id))
|
||||
|
||||
# Try to clone the experiment
|
||||
success = true
|
||||
|
@ -157,7 +157,7 @@ class ExperimentsController < ApplicationController
|
|||
|
||||
# POST: move_experiment(id)
|
||||
def move
|
||||
project = Project.find_by_id(params[:experiment][:project_id])
|
||||
project = Project.find_by_id(params[:experiment].try(:[], :project_id))
|
||||
old_project = @experiment.project
|
||||
|
||||
# Try to move the experiment
|
||||
|
|
|
@ -25,7 +25,9 @@
|
|||
<% end %>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<%= f.submit t("experiments.move.modal_submit"), class: "btn btn-primary" %>
|
||||
<% if !@projects.blank? %>
|
||||
<%= f.submit t("experiments.move.modal_submit"), class: "btn btn-primary" %>
|
||||
<% end %>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><%=t "general.cancel" %></button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue