Sha256: 5644043a97008677f3117f9e1762949a9e38e18023a62271dd070e5c26619ea0
Contents?: true
Size: 564 Bytes
Versions: 71
Compression:
Stored size: 564 Bytes
Contents
class TaskFilesController < ApplicationController def show @task_file = TaskFile.find(params[:id]) send_data(@task_file.content_data, :disposition => @task_file.image? ? 'inline' : 'attachment', :type => @task_file.content_type, :filename => @task_file.name) end def destroy @task_file = TaskFile.find(params[:id]) @task_file.destroy respond_to do |format| format.html { redirect_to(:controller => 'tasks', :action => :edit, :id => @task_file.task) } format.xml { head :ok } end end end
Version data entries
71 entries across 71 versions & 1 rubygems