mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-14 00:54:32 +08:00
fixes update times [fixes SCI-398]
This commit is contained in:
parent
95ab35e3d6
commit
a947354fb5
2 changed files with 3 additions and 2 deletions
|
|
@ -66,7 +66,7 @@ class ExperimentsController < ApplicationController
|
||||||
@experiment.update_attributes(experiment_params)
|
@experiment.update_attributes(experiment_params)
|
||||||
@experiment.last_modified_by = current_user
|
@experiment.last_modified_by = current_user
|
||||||
if @experiment.save
|
if @experiment.save
|
||||||
# @experiment.touch(:workflowimg_updated_at)
|
@experiment.touch(:workflowimg_updated_at)
|
||||||
flash[:success] = t('experiments.update.success_flash',
|
flash[:success] = t('experiments.update.success_flash',
|
||||||
experiment: @experiment.name)
|
experiment: @experiment.name)
|
||||||
redirect_to canvas_experiment_path(@experiment)
|
redirect_to canvas_experiment_path(@experiment)
|
||||||
|
|
|
||||||
|
|
@ -321,7 +321,8 @@ class Experiment < ActiveRecord::Base
|
||||||
file = File.open(file_location)
|
file = File.open(file_location)
|
||||||
self.workflowimg = file
|
self.workflowimg = file
|
||||||
file.close
|
file.close
|
||||||
save!
|
save
|
||||||
|
touch(:workflowimg_updated_at)
|
||||||
rescue => ex
|
rescue => ex
|
||||||
logger.error ex.message
|
logger.error ex.message
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue