[rspec-users] send_file testing

vo.x v.ondruch at gmail.com
Mon Feb 23 02:43:10 EST 2009


Just to be clear, this is how the action looks:

  def download
    log = ActivityLog.find(params[:id])
    if log
      send_file log.path
    else
      flash[:notice] = _("Log file \"#{params[:id]}\" was not found.")
      redirect_to :action => 'index'
    end
  end

Vit


More information about the rspec-users mailing list