Sha256: 888697124e00fb5ff5ed43386b7bbb9c58fe60e731b955203f72a9b0963bb978

Contents?: true

Size: 572 Bytes

Versions: 82

Compression:

Stored size: 572 Bytes

Contents

module Festivity
  module Extensions
    module PaperclippedExtensions

      def async_create
        @asset = Asset.new(params[:asset])
        if @asset.save
          if params[:page]
            @page = Page.find(params[:page])
            existing_asset = @page.assets.find_by_title(@asset.title)
            @page.assets.delete(existing_asset) if not existing_asset.nil?
            @asset.pages << @page
          end
          render :text => @asset.thumbnail(:thumbnail)
        else
          head :internal_server_error
        end
      end

    end
  end
end

Version data entries

82 entries across 82 versions & 1 rubygems

Version Path
trusty-festivity-extension-2.5.3 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.5.2 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.5.1 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.5.0 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.4.6 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.4.5 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.4.4 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.4.3 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.4.2 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.4.1 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.4.0 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.3.30 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.3.29 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.3.28 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.3.27 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.3.26 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.3.25 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.3.24 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.3.23 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.3.22 lib/festivity/extensions/paperclipped_extensions.rb