| arooni | sqs: why do you need to do both? also, will this work with css files? |
| sqs | arooni: 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? |
| arooni | sqs: right |
| flowandcrash | hey 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 |
| sqs | arooni: yeah, youll need to fix those yourself. should be doable with a regexp |
| flowandcrash | kinda lame =) |
| sqs | flowandcrash: those are the same, actually - the parentheses there are unnecessary |
| flowandcrash | no i know... but it's inconsistent n i actually like using () when there are arguments/params |
| sqs | flowandcrash: oh yeah, you are right. well, nothing's stopping you from submitting a patch and fixing it :) |
| wolfs | if i have a large ammount of binary data that is read, what is the best way to pass that data to a method? |
| flowandcrash | =) |
| arooni | sqs: but how would i go about adding that modified css back? sqs: would i need a separate style section in the html? |
| sqs | arooni: 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 |
| arooni | sqs: you're righ!!!!!!!!!! images are relative to css file |
| sqs | excellent, a few hours saved there |
| cliffstah | whew, that was an adventure went from installing rubygems to a full debian dist upgrade |
| sqs | ok, is anyone here using Amazon EC2? |
| carterparks | i've thought about it it scares me a little to know that it if its shutdown everything is wiped |
| arooni | sqs: howd you handle it when the user gave you a non existent web site |
| sqs | arooni: like if i typed in http://asdjdfjdsklfjdsfd.com ? |
| arooni | sqs: ya |
| sqs | arooni: i wrapped it in a begin...rescue block and caught the exception |
| arooni | sqs: did you wrap the whole thing? or just the openURI part also ... where did this code live sqs ? in your model? |
| sqs | arooni: 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. |
| lalalalilili | is there an easier way to pass value between javascript and ruby besides using hidden form? |
| sqs | lalalalilili: Ajax.Request http://www.sergiopereira.com/articles/prototype.js.html |
| arooni | sqs: hmm i guess it makes sense that it'd be in the view |
| lalalalilili | as i can't make it to work using hidden form |
| arooni | sqs: openuri is a gem? |
| oomwrtu | ok, 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]? |
| sqs | arooni: 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? |
| oomwrtu | sqs: more or less, but also, how do i get the associated BookCourses of those Books? |