fix error
This commit is contained in:
parent
eca64d50cc
commit
7568aaafaf
|
@ -15,7 +15,12 @@ class ArchiveFile
|
||||||
# BelongsToCategory = :archive_file_category
|
# BelongsToCategory = :archive_file_category
|
||||||
|
|
||||||
# PAYMENT_TYPES = @site_valid_locales
|
# PAYMENT_TYPES = @site_valid_locales
|
||||||
|
before_save do
|
||||||
|
cat = self.category rescue nil
|
||||||
|
if cat && ArchiveCategory.where(:category_id => cat.id).count==0
|
||||||
|
ArchiveCategory.create(category_id: cat.id.to_s)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
field :title, as: :slug_title, localize: true
|
field :title, as: :slug_title, localize: true
|
||||||
field :description, localize: true
|
field :description, localize: true
|
||||||
|
|
Loading…
Reference in New Issue