Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix #882 if preview exists it should be the only media record

  • Loading branch information...
commit d0537b10a333db2c7d71684a3e9b70a6c930ed02 1 parent 0fc9037
@mfrederickson mfrederickson authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  app/controllers/contents_controller.rb
View
1  app/controllers/contents_controller.rb
@@ -111,6 +111,7 @@ def create
# only reassign if not already assigned
if @media[:key] == 'preview' && @media[:attachable_id] == 0
@media[:key] = 'original'
+ @content.media.clear
@content.media.concat(@media)
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.