Great screencast - great gem. However, there's one big problem with validation. It tells you what you did wrong, but it doesn't show you what you did. It's especially bad with the email example. The field contains a valid email. The user changes it to an invalid email. The valid email is redisplayed with a message saying it's invalid!
I think one of the prime directives of UI should be that if the user makes a mistake, he should be able to edit it, rather than re-enter it.
I can see some uses for this gem, but I would not use it if validation is needed.
@Rick: That's why I never like the "Gang of Four" moniker. To me, the book is "Gamma, Helms, Johnson and Vlissides". I was fortunate to have a useful email exchange with John before his death.
Great screencast - great gem. However, there's one big problem with validation. It tells you what you did wrong, but it doesn't show you what you did. It's especially bad with the email example. The field contains a valid email. The user changes it to an invalid email. The valid email is redisplayed with a message saying it's invalid!
I think one of the prime directives of UI should be that if the user makes a mistake, he should be able to edit it, rather than re-enter it.
I can see some uses for this gem, but I would not use it if validation is needed.
I'm with Ryan on this one. Even though for..in is "unfashionable," it's more expressive and easier to type. That's a good combination.
The only reason I've heard for why people don't use it is because (other) people don't use it.
@Rick: That's why I never like the "Gang of Four" moniker. To me, the book is "Gamma, Helms, Johnson and Vlissides". I was fortunate to have a useful email exchange with John before his death.
Unfortunately, you can't change the order of the chosen items, so it wouldn't actually be useful for an authors list in many cases.
Awesome, as usual.
The only thing I'd say is that the action is misnamed. You're not reverting the version in the parameter - you're reverting TO that version.