app/controllers/effective/assets_controller.rb in effective_assets-1.11.0 vs app/controllers/effective/assets_controller.rb in effective_assets-1.11.1
- old
+ new
@@ -6,12 +6,11 @@
# iframe
def index # This is the IFRAME modal dialog that is read by CKEDITOR
EffectiveAssets.authorized?(self, :index, Effective::Asset.new(:user_id => current_user.try(:id)))
- effective_iframe_uploads = Effective::Attachment.where(box: EffectiveAssets::IFRAME_UPLOADS).pluck(:asset_id)
- @assets = Effective::Asset.where(id: effective_iframe_uploads)
+ @assets = Effective::Asset.where(user_id: current_user.id)
if params[:only] == 'images'
@assets = @assets.images
@file_types = [:jpg, :gif, :png, :bmp, :ico]
@aws_acl = EffectiveAssets::AWS_PUBLIC
@@ -20,10 +19,9 @@
@file_types = [:pdf, :zip, :doc, :docx, :xls, :xlsx, :txt, :csv, :avi, :m4v, :m2v, :mov, :mp3, :mp4, :eml]
@aws_acl = EffectiveAssets.aws_acl
end
@user_uploads = IframeUpload.new(@assets)
- @user_uploads.add_to_asset_box(:uploads, @assets)
render :file => 'effective/assets/iframe'
end
def destroy