forked from OpenNeo/impress
Oops, fix validation bug for SwfAsset
Oh right, saving an asset that doesn't have a manifest will crash this validation step!
This commit is contained in:
parent
96998643b5
commit
d35b10c1b8
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ class SwfAsset < ApplicationRecord
|
||||||
|
|
||||||
scope :includes_depth, -> { includes(:zone) }
|
scope :includes_depth, -> { includes(:zone) }
|
||||||
|
|
||||||
before_validation :normalize_manifest_url
|
before_validation :normalize_manifest_url, if: :manifest_url?
|
||||||
|
|
||||||
def swf_image_dir
|
def swf_image_dir
|
||||||
@swf_image_dir ||= Rails.root.join('tmp', 'asset_images_before_upload', self.id.to_s)
|
@swf_image_dir ||= Rails.root.join('tmp', 'asset_images_before_upload', self.id.to_s)
|
||||||
|
|
Loading…
Reference in a new issue