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 [...]
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.
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.
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 [...]
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 [...]