Cropping images to create squares with attachment_fu and mini_magic

I was looking for a way to create cropped thumbnails using attachment_fu and found this post which is perfect. It references another post for certain parts of the code. For both my own future use and for the good of all I thought I’d combine the two to make it easier to follow when [...]

RXML rendering shouldn’t use RHTML layouts

Putting the following in your application controller will prevent rhtml layouts from being used.

exempt_from_layout :rxml

Most respond_to stuff seems to overlook this. Whatever argument (extension) you pass it, will result in those templates (rxml in this case) from rendering layouts.

What a pain: RESTful Rails routes, Safari, HTTP Authentication, encoded semicolons

After struggling with RESTful routes in production, I checked my apache access logs to see a bunch of 401 http response codes, but also noticed they were only found when the agent was safari. I found this, which both explains and offers relief.

Adding query analysis to CF’s built-in debug output (for MySQL)

I came across a cool plugin for Rails that allows you to analyze your queries in MySQL. It takes advantage of the EXPLAIN statement, which you can read about here if you aren’t already familiar with it. And if you aren’t familiar with it, you should get familiar with it :) It’s a really easy [...]

Multiple query statements using Connector/J to connect to MySQL 5

I’m in the process of porting an MSSQL databse to MySQL which powers a CFMX 7 application. Some of the query calls were getting hung up when using multiple queries inside one cfquery tag. By default multiple queries are not permitted. After digging around on the mysql site, turns out there are a [...]