Yan Pritzker photographer, entrepreneur, software engineer, musician, skier

Blog :: Git Workflows Book :: Dotfiles :: Photography :: About Me

TwitterCounter for @skwp

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

hello, i'm yan

I am a photographer, entrepreneur, software engineer, guitarist, climber, and telemark skier

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

I am the chief technical something or other at Reverb.com - The Marketplace for Musicians. We're hiring web designers!

Recent Tweets

Selected Reading

Archives

Contact

Reach me at yan at pritzker.ws

Posts Tagged RubyOnRails

Testing your ActiveRecord migrations

Sometimes you have a data migration that creates or modifies records in some way, and you would like to test it in your unit tests right? Except that Rails typically just clones the structure of your dev database, not its data. So how do you test that a migration succeeded? Simple, just invoke it during [...]


validates_acceptance_of behavior in Rails 2.0

I noticed that when upgrading to Rails 2.0, my validates_acceptance_of started failing (or rather, it started telling me that my field was not accepted when the param being passed was ’1′). Apparently I had to add the :accept => true to make it work. I discovered this by reading the Rails source, where it mentions [...]


acts_as_versioned for a set of columns

acts_as_versioned is a great plugin for versioning a set of model attributes transparently every time you save. The plugin seems to be built with exclusion in mind (version all except these) but to get it to work only on a specific set of columns, this simple trick can be applied: class Foo [:description_t] def versioned_attributes; [...]


← Before After →