Wheels Model Sugar Plugin

I threw out a question on Twitter yesterday asking if it made sense to add a model method named findAllKeys() to Wheels which would basically just be a shortcut for doing a findAll(select="id") and then performing a ValueList() on it. Raul Riera, among others, responded and said "that would be a great plugin". I think he's getting sick of hearing that phrase from me and took his chance to use it against me this time ;). I took his advice and built a plugin though - the Model Sugar plugin.

I added some more syntactic sugar besides findAllKeys() to it while I was at it. All in all the plugin adds 4 methods to your models: findAllKeys(), findFirst(), findLast() and findOneOrCreateBy[Property]. Here are some quick examples of what you can do with it:

Per Djurner

Per Djurner

Working with ColdFusion, JavaScript, ActionScript, SQL, CSS, HTML and more at SingSnap.

Archive

2012 (1)
2011 (1)
2010 (6)
2009 (1)
| Viewed
times
Posterous theme by Cory Watilo