While using Query Reviewer, I occasionally come across a warning along the lines of the following:
2 identical queries Table videos: Long key length (768)
With the following explanation:
The key used for the index was rather long, potentially affecting indices in memory
To fix this we need to limit the length of our index. We can do this [...]
If you ever need to know if an image is portrait or landscape in orientation, you can do the following (assuming you have an orientation attribute on your model:
class Image < ActiveRecord::Base
# Paperclip
has_attached_file :file
You know those times when Textmate beachballs for about 5 seconds when it regains focus, it’s generally caused by the fact you’ve got about 16 million folders in your public/system folder used by paperclip.
Here’s a quick tip to speed things up by ignoring those folders:
Open Textmate Preferences and goto the Advanced section. Then click on [...]