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