Paperclip before_process For Your Habitual Pornographic Needs

Ok, so say you built yourself a handy dandy little webapp for organizing all the porno pics you ripped from google image search, you know, since you live alone in your parents basement and all. Suddenly, it strikes you, “I should move up to porno movies now, but I want to keep my images”. You’re [...]

Programming, RubyOnRails

Disabling Paperclip asset timestamp keeps you from committing genocide

Know what’s frustrating? Having a flash app that pulls xml from a controller not function. What’s even more frustrating is finding out it’s because of asset timestamp caching. That’s right, that stupid little ‘?293636′ is a form of caching, and works fine, except when it’s being swallowed by flash via XML. I forgot to write [...]

Programming, RubyOnRails

Paperclip Resized Image Details In to_xml

I love paperclip. In fact, I love paperclip enough to name my next child paperclip. The issue at hand is calling to_xml on an object that is using paperclip. What you end up with is something like this:
1234567891011121314<studio>
  <created-at type="datetime">2009-06-18T17:02:49Z</created-at>
  <description>A Studio Description Here</description>
  <id type="integer">1</id>
  <photo-content-type>image/jpeg</photo-content-type>
  <photo-file-name>jaws.jpg</photo-file-name>
  <photo-file-size type="integer">833900</photo-file-size>
  <photo-updated-at type="datetime">2009-06-18T17:02:48Z</photo-updated-at>
  <state>active</state>
  <title>Some Title [...]

RubyOnRails

Why my next child will be named Paperclip

Ok, I lied, my next child will NOT be named Paperclip, but I thought about it for a moment. Aside from the simple fact that it makes attachment_fu its bitch, there is a simple feature that just makes my butt wet. You know, that one feature that makes you ignore your own child.
1$ rake paperclip:refresh [...]

RubyOnRails

RubyOnRails Seed_fu and Paperclip woes

If you aren’t aware of Seed_fu, it’s a fantastic plugin for RubyOnRails that allows you to populate your database with data, not with yaml files, but with code. Paperclip is an attachment plugin, which, in my opinion, dominates over attachment_fu.
All was fine until I was building a seed for my default admin user. Every time [...]

RubyOnRails