Debugging JavaScript With Safari
I usually use FireBug and other FireFox-based tools for troubleshooting JavaScript issues, but never found a solid way to approach it in Safari, my primary browser. It turns out that the nightly builds of WebKit (Safari’s core) also come with a great utility called Drosera.app, which allows you to attach to a running WebKit process and get funky with a JavaScript console.
Tags: apple, debugging, drosera, firefox, javascript, mac, osx, rails, ror, ruby, safari, webkit
Rails attachment_fu/Kropper Scaling Fix: attachment_fu_skip_resize
I recently integrated Kropper into a custom RoR application for OpenRain affiliate img surf. A fundamental flaw in the upload-save-crop-save process used by Kropper is that attachment_fu automatically scales down the image on first save to :resize_to dimensions. After the subsequent crop–which may result in a significant drop in resolution–the image is scaled back up to :resize_to dimensions: an ugly lossy operation.
The attachment_fu_skip_resize plugin gives attachment_fu the ability to temporarily bypass resizing of the full-size original image, thus allowing your final cropped photos to be of the highest quality as possible.
- Install the plugin.
- In your attachment_fu image class, add..
attr_accessor :skip_resize
- Any time you want to save an image without invoking resizing on the original image..
image.skip_resize = true image.save
Thumbnails will be generated at their defined resolutions regardless of the skip_resize flag.
Tags: attachment_fu, fix, howto, javascript, kropper, plugin, rails, ruby



