the error message was not displayed correctly during a wrong import + remove the last tracks of the deprecated asset collections
This commit is contained in:
parent
1e465e231e
commit
00fd00240f
@ -15,7 +15,8 @@
|
||||
= label_tag 'zipfile', t('formtastic.labels.import.new.source')
|
||||
= file_field_tag 'zipfile'
|
||||
- if @error
|
||||
%p.inline-errors= @error
|
||||
.inline-errors
|
||||
%p= @error
|
||||
%p.inline-hints= t('formtastic.hints.import.source')
|
||||
|
||||
%li.input.toggle
|
||||
|
@ -122,9 +122,7 @@ module Locomotive
|
||||
template.gsub!(/\/samples\/(.*\.[a-zA-Z0-9]{3})/) do |match|
|
||||
name = $1
|
||||
|
||||
collection = AssetCollection.find_or_create_internal(site)
|
||||
|
||||
if asset = collection.assets.detect { |a| a.source_filename == name }
|
||||
if asset = site.assets.where(:source_filename => name).first
|
||||
asset.source.url
|
||||
else
|
||||
match
|
||||
|
Loading…
Reference in New Issue
Block a user