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.3.1 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.3.0 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.2.9 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.2.8 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.2.7 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.2.6 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.2.5 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.2.4 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.2.3 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.2.2 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.2.1 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.2.0 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.1.1 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.1.0 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.0.7 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.0.6 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.0.5 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.0.4 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.0.3 lib/festivity/extensions/paperclipped_extensions.rb
trusty-festivity-extension-2.0.2 lib/festivity/extensions/paperclipped_extensions.rb