fix text file preview in rails3
fix text file preview in rails3

test plan:
 - upload a text file to a course
 - add it to a module
 - click the module item
 - you should see the file content,
   not "<#Proc ...>"

fixes CNVS-11934

Change-Id: Ieb3817365306080ddbb98664c62e61eea9882f72
Reviewed-on: https://gerrit.instructure.com/32162
Tested-by: Jenkins <d95b56ce41a2e1ac4cecdd398defd7414407cc08@instructure.com>
Reviewed-by: Bracken Mosbacker <48b846001bca4166dc3fb7711563afc17525921e@instructure.com>
Product-Review: Bracken Mosbacker <48b846001bca4166dc3fb7711563afc17525921e@instructure.com>
QA-Review: Matt Fairbourn <5f353e1c97bb9cc046b9db20beca0b9392f6f1b2@instructure.com>

samuels410/greatlakes-lms,venturehive/canvas-lms,leftplusrightllc/canvas-lms,whalejasmine/canvas-lms,sdeleon28/canvas-lms,va7map/canvas-lms,SwinburneOnline/canvas-lms,djbender/canvas-lms,whalejasmine/canvas-lms,SwinburneOnline/canvas-lms,va7map/canvas-lms,HotChalk/canvas-lms,instructure/canvas-lms,tgroshon/canvas-lms,AndranikMarkosyan/lms,skmezanul/canvas-lms,redconfetti/canvas-lms,tgroshon/canvas-lms,utkarshx/canvas-lms,SwinburneOnline/canvas-lms,snehakachroo1/LSI_replica,greyhwndz/canvas-lms,djbender/canvas-lms,snehakachroo1/LSI_replica,fronteerio/canvas-lms,tgroshon/canvas-lms,matematikk-mooc/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,Rvor/canvas-lms,jay3126/canvas-lms,redconfetti/canvas-lms,eCNAP/CANVAS,greyhwndz/canvas-lms,jay3126/canvas-lms,ShreniiNepal/shrenii_lmp,va7map/canvas-lms,usmschuck/canvas,instructure/canvas-lms,roxolan/canvas-lms,efrj/canvas-lms,Unow/canvas-lms,roxolan/canvas-lms,wrdsb/canvas-lms,eCNAP/CANVAS,matematikk-mooc/canvas-lms,antoniuslin/canvas-lms,gbleydon/canvas-lms,utkarshx/canvas-lms,efrj/canvas-lms,AndranikMarkosyan/lms,grahamb/canvas-lms,juoni/canvas-lms,wrdsb/canvas-lms,redconfetti/canvas-lms,whalejasmine/canvas-lms,instructure/canvas-lms,samuels410/greatlakes-lms,shidao-fm/canvas-lms,shidao-fm/canvas-lms,ShreniiNepal/shrenii_lmp,AndranikMarkosyan/lms,usmschuck/canvas,wye0220/shindig-canvas,instructure/canvas-lms,fronteerio/canvas-lms,efrj/canvas-lms,gbleydon/canvas-lms,antoniuslin/canvas-lms,HotChalk/canvas-lms,dgynn/canvas-lms,wye0220/shindig-canvas,utkarshx/canvas-lms,leftplusrightllc/canvas-lms,Jyaasa/canvas-lms,Rvor/canvas-lms,ShreniiNepal/shrenii_lmp,fronteerio/canvas-lms,skmezanul/canvas-lms,wye0220/shindig-canvas,jay3126/canvas-lms,grahamb/canvas-lms,eCNAP/CANVAS,skmezanul/canvas-lms,grahamb/canvas-lms,narigone/canvas,matematikk-mooc/canvas-lms,shidao-fm/canvas-lms,utkarshx/canvas-lms,kyroskoh/canvas-lms,tgroshon/canvas-lms,sfu/canvas-lms,Jyaasa/canvas-lms,Jyaasa/canvas-lms,venturehive/canvas-lms,snehakachroo1/LSI_replica,instructure/canvas-lms,kyroskoh/canvas-lms,djbender/canvas-lms,Jyaasa/canvas-lms,sdeleon28/canvas-lms,matematikk-mooc/canvas-lms,roxolan/canvas-lms,instructure/canvas-lms,wrdsb/canvas-lms,djbender/canvas-lms,greyhwndz/canvas-lms,wrdsb/canvas-lms,narigone/canvas,dgynn/canvas-lms,Rvor/canvas-lms,juoni/canvas-lms,samuels410/greatlakes-lms,leftplusrightllc/canvas-lms,AndranikMarkosyan/lms,kyroskoh/canvas-lms,jay3126/canvas-lms,HotChalk/canvas-lms,sfu/canvas-lms,efrj/canvas-lms,Unow/canvas-lms,samuels410/greatlakes-lms,roxolan/canvas-lms,antoniuslin/canvas-lms,sfu/canvas-lms,dgynn/canvas-lms,grahamb/canvas-lms,greyhwndz/canvas-lms,kyroskoh/canvas-lms,narigone/canvas,whalejasmine/canvas-lms,ShreniiNepal/shrenii_lmp,juoni/canvas-lms,usmschuck/canvas,juoni/canvas-lms,narigone/canvas,HotChalk/canvas-lms,sdeleon28/canvas-lms,va7map/canvas-lms,snehakachroo1/LSI_replica,gbleydon/canvas-lms,usmschuck/canvas,shidao-fm/canvas-lms,leftplusrightllc/canvas-lms,venturehive/canvas-lms,dgynn/canvas-lms,eCNAP/CANVAS,instructure/canvas-lms,fronteerio/canvas-lms,sdeleon28/canvas-lms,SwinburneOnline/canvas-lms,Rvor/canvas-lms,grahamb/canvas-lms,skmezanul/canvas-lms,Unow/canvas-lms,antoniuslin/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,venturehive/canvas-lms,redconfetti/canvas-lms