Revert "FIX: constant lookup error when exporting theme"
This reverts commit 1eda8c50f0
.
This commit is contained in:
parent
813df1a3fb
commit
041deac67a
|
@ -190,7 +190,7 @@ class Admin::ThemesController < Admin::AdminController
|
|||
|
||||
response.headers['Content-Disposition'] = "attachment; filename=#{@theme.name.parameterize}.dcstyle.json"
|
||||
response.sending_file = true
|
||||
render json: ::ThemeWithEmbeddedUploadsSerializer.new(@theme, root: 'theme')
|
||||
render json: ThemeWithEmbeddedUploadsSerializer.new(@theme, root: 'theme')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -91,3 +91,7 @@ class ThemeFieldWithEmbeddedUploadsSerializer < ThemeFieldSerializer
|
|||
Base64.encode64(raw)
|
||||
end
|
||||
end
|
||||
|
||||
class ThemeWithEmbeddedUploadsSerializer < ThemeSerializer
|
||||
has_many :theme_fields, serializer: ThemeFieldWithEmbeddedUploadsSerializer, embed: :objects
|
||||
end
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
class ThemeWithEmbeddedUploadsSerializer < ThemeSerializer
|
||||
has_many :theme_fields, serializer: ThemeFieldWithEmbeddedUploadsSerializer, embed: :objects
|
||||
end
|
Loading…
Reference in New Issue