#rubyonrails - Fri 6 Apr 2007 between 01:49 and 02:08

NY Lost Funds



tpopelook at the implementation of "reload!" for script/console
nullietpope, yes
tpope, thanks
JasonKingpaul-smit: you can't really make a link - you need to set the content-type which you can't do in HTML for a plain link.
slapahowhere do i look up the docs for %w ?
paul-smithow do you do that? can I not use the link to?
tpopepaul-smit: not a direct solution, but you'll learn a few helpful things if you look at send_data and send_file
JasonKingpaul-smit: are you linking to the MPG file? Or to an action?
paul-smitdirectly to the mog
*mpg
JasonKingpaul-smit: right, that can't work. HTML just doesn't have the ability to communicate that to the browser for a plain link.
paul-smitright now I'm jsut using plain html ahref tags
how would I do it then?
JasonKingpaul-smit: you'd either need to set the mime type in the server config so that it set the Content-Type to application/octet-stream
slapahoanyone?
JasonKingpaul-smit: or have a script that you link to which reads the MPG file off disk and feeds it to the browser, because you can set the Content-type in your script.
paul-smitwhat about the senfile method tpope was talking about I just looked it up in the API would that work?
JasonKingpaul-smit: yes, that's the second method I just mentioned.
paul-smitand would I set the MIME type inside of the rails app file structure? I'm very new so I don't get all of whats happening fully
oh okay haha sorry I'm very new to this
JasonKingNp.
paul-smit: just pass :type => "application/octet-stream" with your send_file method.
paul-smitokay thanks I will try that right now
JasonKingpaul-smit: actually, I'm reading that that's the default - so just leave it off :)
paul-smitawesome thanks
JasonKingslapaho: pickaxe - front of the index
tpopeoctet-stream is the wrong solutino
there's a content disposition header for this
JasonKingtpope: send_file does it both.
tpopeyou should set the right content type and then set the disposition
JasonKingtpope: nooo, plenty of browsers ignore the disposition header.
tpopesaying application/octet-stream is soooo 1.0
soo web 1.0
totally butchered that
JasonKingtpope: translated to Microsoftese, it's so 5.5
tpopeI will test that some tomorrow
slapahohey guys, is there an easy method to turn params into a nice easy-to-view list?
like params output
?
aasmithrequire 'pp'; pp params

Page: 2 9 16 23 30 37 44 51 58 65 72 79 86 93 

IrcArchive

NY Lost Funds