mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-10 06:37:32 +08:00
Merge pull request #93 from jbargu/jg_sci_378_move_experiment_error
Fix 404 move experiment error
This commit is contained in:
commit
5c104ac050
2 changed files with 5 additions and 3 deletions
|
@ -106,7 +106,7 @@ class ExperimentsController < ApplicationController
|
||||||
|
|
||||||
# POST: clone_experiment(id)
|
# POST: clone_experiment(id)
|
||||||
def clone
|
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
|
# Try to clone the experiment
|
||||||
success = true
|
success = true
|
||||||
|
@ -157,7 +157,7 @@ class ExperimentsController < ApplicationController
|
||||||
|
|
||||||
# POST: move_experiment(id)
|
# POST: move_experiment(id)
|
||||||
def move
|
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
|
old_project = @experiment.project
|
||||||
|
|
||||||
# Try to move the experiment
|
# Try to move the experiment
|
||||||
|
|
|
@ -25,7 +25,9 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<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>
|
<button type="button" class="btn btn-default" data-dismiss="modal"><%=t "general.cancel" %></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue