skwpspace yan pritzker’s home on the web

skwpspace is Yan Pritzker's home on the web

Blog :: Photography :: About Me

TwitterCounter for @skwp

Get the news feed
Get updates by email
Follow me on twitter

hello, i'm yan

This blog is about startups, blogging, Ruby On Rails, virtualization and cloud computing, photography, customer service, marketing, ux and design, git, and lots more.

Top Posts

planypus

I'm the founder of Planypus, the place to share your plans!

cohesiveft

Accessible, manageable, virtualized application stacks ready to download or deploy to the cloud!

flickr

it's hailing in san franciscojessatianalyndaBird in the handkerimodeldanielle pettee and models-4449

Archives

Contact

Reach me at yan at pritzker.ws

Posted
30 July 2008 @ 10am

Tagged
RubyOnRails

Rails Tips: Make fixtures play nice with acts_as_paranoid

I was trying to write a test involving deleted items on a project using acts_as_paranoid (which marks objects with a deleted_at date instead of actually deleting them). When I created a fixture with a deleted_at date set, it turns out that making the fixture retrieval call items(:deleted_item) would fail because internally the fixtures use a find, which then fails to find the deleted item. Here’s a workaround that extends the Fixtures class to do the right thing:

acts_as_paranoid_fixtures.rb on gist.github.com


No Comments Yet


There are no comments yet. You could be the first!

Leave a Comment

Followers lost in twitter failstorm Does cold calling actually work for you IT firms?