mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-27 02:04:33 +08:00
Add expiring URL to experiment img
This commit is contained in:
parent
f77e0d4a6e
commit
7b0f323576
2 changed files with 2 additions and 2 deletions
|
@ -13,7 +13,7 @@ class Experiment < ActiveRecord::Base
|
|||
has_many :my_module_groups, inverse_of: :experiment, dependent: :destroy
|
||||
has_many :report_elements, inverse_of: :experiment, dependent: :destroy
|
||||
|
||||
has_attached_file :workflowimg, styles: { medium: '300x300>' }
|
||||
has_attached_file :workflowimg
|
||||
validates_attachment_content_type :workflowimg, content_type: /\Aimage\/.*\Z/
|
||||
|
||||
validates :name,
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<div class="panel-body">
|
||||
<% if experiment.workflowimg? %>
|
||||
<div class="workflowimg-container">
|
||||
<%= link_to image_tag(experiment.workflowimg,
|
||||
<%= link_to image_tag(experiment.workflowimg.expiring_url(30),
|
||||
class: 'img-responsive center-block'),
|
||||
canvas_experiment_path(experiment) %>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue