mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-02-05 07:51:18 +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
|
storage :file
|
||||||
|
|
||||||
def store_dir
|
def store_dir
|
||||||
"images"
|
File.join("local", "maps")
|
||||||
end
|
end
|
||||||
|
|
||||||
def filename
|
def filename
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
<div class="fields horizontal">
|
<div class="fields horizontal">
|
||||||
<%= f.label :picture %>
|
<%= f.label :picture %>
|
||||||
<div class="inputs">
|
<div class="inputs">
|
||||||
<% if @map.picture.length > 0 %>
|
<% if @map.picture&.file&.exists? %>
|
||||||
<%= image_tag @map.picture %><br>
|
<%= image_tag @map.picture.url %><br>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= f.file_field :picture %>
|
<%= f.file_field :picture %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
<% if @map.picture.length > 0 %>
|
<% if @map.picture.length > 0 %>
|
||||||
<div class="preview">
|
<div class="preview">
|
||||||
<%= image_tag @map.picture %>
|
<%= image_tag @map.picture.url %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue