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.6.3 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.6.2 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.6.1 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.6 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.5.19 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.5.18 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.5.17 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.5.16 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.5.15 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.5.14 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.5.13 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.5.12 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.5.11 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.5.10 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.5.9 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.5.8 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.5.7 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.5.6 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.5.5 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.5.4 lib/festivity/extensions/paperclipped_extensions.rb