Another quick Rails lifesaver
October 3rd, 2008
It’s always driven me crazy that the Rails validation macros don’t allow you to override the field name in the error message.
validates_length_of :summary, :maximum => 1500, :too_long => "can not exceed 1,500 characters"
will result in “Summary cannot exceed 1,500 characters”. But the label on the form is Description and the stakeholder wants the message to match the form. Argh.
Well, courtesy of Rails wizard and co-worker Duncan:
# alias attr to the name it has on the form allows us to validate using the form label name and make the message correct alias_attribute :description, :summary validates_length_of :description, :maximum => 1500, :too_long => "can not exceed 1,500 characters"
Short, sweet and super-easy. And the Rails docs on validation don’t appear to mention this. I should submit a documentation patch.
Shows
June 9th, 2008
Experienced the face-melting, breakcore blast of Venetian Snares last night. I was reminded of the scene in Mozart where the prince says Mozart’s work simply has “too many notes”. That prince’s head would have exploded were he exposed to the high-speed, mind-bogglingly intricate barrage of beats and bleeps produced by Mr. Aaron Funk.
I definitely did not have any qualms with the voluminous amount of notes Funk spewed out. It was a bit of a challenge to stick with him through the whole set (especially because of the ridiculous amount of smoke in the club… I think I probably inhaled over a carton’s worth of smoke over the night), but that wasn’t because he ever ran out of things to say.
The glitchy, spastic, sonic tapestry was downright hallucinogenic at times… had me jerking and twitching in my chair. I felt for the people who actually tried to dance! VSnares are definitely an acquired taste — probably requiring a somewhat masochistic streak as well — but I’m definitely glad to have experienced it.
The ever insane Otto Von Schirach opened. I’ve dubbed him “smirkcore”… cuz you just gotta have a smirk on your face the entire time you’re watching his somewhat Mexican-wrestler inspired stage presence and weathering his blasts of electronic noise.
On quite a different musical note (heh), I saw Firewater last Wednesday (before I started this blog). That was something of a spiritual experience as well. Firewater is Tod A (from Cop Shoot Cop) putting his great, plaintive vocal style in front of a five-piece band that mixes up an eclectic stew of ethnic musical influences. In addition to guitar, bass, and drums, there was also a trombone player (who was really hot… she reminded me of Salma Hayek) and a percussionist (dressed in traditional garb of some eastern country — perhaps Pakistan? — including a turban).
On several songs, the percussionist played a large drum, hung on a strap around his shoulders, with curved mallets on both ends. He would just bop around a bit without playing until the right moment and would then cut loose with a flurry of beats and carry the song through the chorus, jumping up and down and beating the hell out of that drum. It was great. All in all, very emotional and powerful music.
Oh, I also saw Portland punk rock legends Poison Idea Saturday night at my old stomping grounds, Satyricon. It was packed to the gills and — fearing for my rickety old bones — I stayed toward the back, so I didn’t really get the full effect. However, they played a bunch of their classics and the crowd ate it up.
Jerry A is the only original member anymore, but the young rockers he’s got backing him now definitely seem to be worthy of the PI mantle… cranking out the blistering riffs and breakneck tempos just fine. Jerry was his usual smirky, quirky self. He even drank a “beverage” (club is all ages now) out of a Converse that would up on stage. Not quite as punk as the old razor blade days, but heck, I wouldn’t do it!