RailsCasts Pro episodes are now free!

Learn more or hide this

Han's Profile

GitHub User: logical42

Site: lsatqa.com

Comments by Han

Avatar

no problem, i remember that biting me in the butt once too :/

Avatar

You need to hook the remove method into a callback function which is executed once the fadeOut method finishes, like so:

$("#item_div").fadeOut("500", function() { $(this).remove();})
Avatar

I believe it's logically equivalent to this a = a ? a : "something"

Which means:
set the value of a to, if there is an 'a', then a, otherwise set it to "something"

Avatar

i appreciate the reply but my problems haven't been that i have been unable to access images from css(or scss) files, but rather, using image_tag helpers in my views. for some reason, the image tag helpers don't seem to function properly on the beta apps i've been playing around with. but that could be because i am running off of windows. i have no idea why this is the case, to be honest.

Avatar

it's sort of a fascinating bug, actually. because it only seems to happen if you comment twice in a row, in which case, the second comment appears above the first, but when looking later, it seems that my later comments appear below my initial one, so it may be a javascript thing.

Avatar

oh and, Ryan, like the new design, but i just realized that my newer comments appear above my older ones when i post to a comment twice which may be sort of confusing. may be worth looking into?

Avatar

you can also manually create an images folder in the public folder (which i've tried) but again, that seems to defeat the point.

Avatar

Ryan, love the casts. You are a stellar teacher.

Hadis, I'm a bit confused about this point as well. I can see that an images folder is generated in the assets folder, from which I inferred was now the default directory for images, but image_tag helpers don't seem to connect properly, though when I substitute image_path, the directory structure seems to work. It's a bit odd. Even more strange is the fact that when images are routed through css (or scss) files, they do seem to default to the 'assets/images' folder. Temporarily, I've fixed it by appending the entire path starting from root, but it is very un-rubylike and sorta annoying.