#rubyonrails - Mon 9 Apr 2007 between 03:35 and 03:48



aroonisqs: why do you need to do both? also, will this work with css files?
sqsarooni: just to be safe. websites spew crappy html. also, there were other reasons that i forget. :) and no it wont work for css files, you mean if a css file specifies background:@url(bg.jpg) right?
aroonisqs: right
flowandcrashhey sqs, by the way, in 2 places in the docs i see the exact same thing done differnetly... body(:recipient => recipient) and body :recipient => recipient
sqsarooni: yeah, youll need to fix those yourself. should be doable with a regexp
flowandcrashkinda lame =)
sqsflowandcrash: those are the same, actually - the parentheses there are unnecessary
flowandcrashno i know...
but it's inconsistent
n i actually like using () when there are arguments/params
sqsflowandcrash: oh yeah, you are right. well, nothing's stopping you from submitting a patch and fixing it :)
wolfsif i have a large ammount of binary data that is read, what is the best way to pass that data to a method?
flowandcrash=)
aroonisqs: but how would i go about adding that modified css back?
sqs: would i need a separate style section in the html?
sqsarooni: maybe it wont be necessary for css, because maybe CSS @url()s are relative to the location of the CSS file. im not sure.
arooni: try without any munging of css first and see if CSS still works
aroonisqs: you're righ!!!!!!!!!! images are relative to css file
sqsexcellent, a few hours saved there
cliffstahwhew, that was an adventure
went from installing rubygems to a full debian dist upgrade
sqsok, is anyone here using Amazon EC2?
carterparksi've thought about it
it scares me a little to know that it if its shutdown everything is wiped
aroonisqs: howd you handle it when the user gave you a non existent web site
sqsarooni: like if i typed in http://asdjdfjdsklfjdsfd.com ?
aroonisqs: ya
sqsarooni: i wrapped it in a begin...rescue block and caught the exception
aroonisqs: did you wrap the whole thing? or just the openURI part
also ... where did this code live sqs ? in your model?
sqsarooni: the openuri part only. the first bit lived in a controller that basically proxied a given page. the second part is in a view helper.
lalalalililiis there an easier way to pass value between javascript and ruby besides using hidden form?
sqslalalalilili: Ajax.Request http://www.sergiopereira.com/articles/prototype.js.html
aroonisqs: hmm i guess it makes sense that it'd be in the view
lalalalililias i can't make it to work using hidden form
aroonisqs: openuri is a gem?
oomwrtuok, i think it's b/c i'm tired, but i can't figure it out: i have a Book model which has_many BookCourses. how do i display all the books and their courses where the book's user id is session[:user][:id]?
sqsarooni: i think it's bundled with ruby, but you gotta go require 'open-uri'
oomwrtu: @books = Book.find_by_user_id(session[:user][:id]); in your controller. is that what you were asking for?
oomwrtusqs: more or less, but also, how do i get the associated BookCourses of those Books?

Page: 5 12 19 26 33 40 47 54 61 68 75 82 89 96 103 110 117 124 131 138 145 152 159 

IrcArchive