mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-01-27 11:40:57 +00:00
Fix maps
This commit is contained in:
parent
848866f883
commit
0e9e1044e3
3 changed files with 4 additions and 4 deletions
|
@ -6,7 +6,7 @@ class ImageUploader < CarrierWave::Uploader::Base
|
|||
storage :file
|
||||
|
||||
def store_dir
|
||||
"images"
|
||||
File.join("local", "maps")
|
||||
end
|
||||
|
||||
def filename
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
<div class="fields horizontal">
|
||||
<%= f.label :picture %>
|
||||
<div class="inputs">
|
||||
<% if @map.picture.length > 0 %>
|
||||
<%= image_tag @map.picture %><br>
|
||||
<% if @map.picture&.file&.exists? %>
|
||||
<%= image_tag @map.picture.url %><br>
|
||||
<% end %>
|
||||
<%= f.file_field :picture %>
|
||||
</div>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<% if @map.picture.length > 0 %>
|
||||
<div class="preview">
|
||||
<%= image_tag @map.picture %>
|
||||
<%= image_tag @map.picture.url %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
|
Loading…
Reference in a new issue