Archives for September 2007

Holland Geeks Group

Last night’s Geeks Group was pretty awesome. It’s definitely a night I look forward to every month. The biggest problem is heading home and starting work the next day. Janson Hartliep and I chatted about this heading out.

Geeks Group has a similar high as good conferences. Heading out you have such visions of grandeur, and you feel so empowered to go forth and make the world “awesomer”. But then you realize your day job’s responsibilities and you feel overwhelmed. At the very least it is a great way for a developer to recharge their batteries.

I quickly realized from listening to Dean Whitaker, the President of Whittaker Associates, Brandon Keepers from Collective Idea, and Janson from Elevator Up, that literary speaking. I’m as dumb as a bag of bricks.

They kept talking about book titles and bloggers either in our field, or at least in the fringes of it that just kept me shaking my head with the continual “Who is that guy?”

Towards the end of the conversation, it became readily apparent that I need to read at least a fraction of what they have been going through. So then the topic a wiki came up.

Aaron had previously mentioned a few members have expressed an interest in a job board somewhere for other members, or newcomers to take a look at. While probably not the most elegant solution, it does suffice.

So last night I threw up a wiki on our servers, which totally addresses my selfish need to get a hold of good book / blog titles.

So head over to http://geeks.elevatorup.com/. If you’re already a member, fill out some of your info. If not, feel free to join us on the third tuesday of every month in Holland. You can also check out our new google group. At the very least, add a good title to our book / blog page. I need to git smarter-er.

field_error_proc and Rails Configurations

I came across something in Rails that’s fixed an issue that has seriously irked me.

Given a form in Rails:

<%= f.text_field :name %>

if a validation error would occur, the generated code becomes:

<p>
  <label for="user_name">Name</label>
  <div class="fieldWithErrors"><input id="user_name" name="user[name]" size="30" type="text" value="" /></div>
</p>

Which is invalid markup. I’ve constantly resorted to editing rails source in order to change the divs to spans.

Today I came across something really neat: field_proc_error. By setting this in your configuration like environment.rb, you can drastically change the output of the generated error

config.action_view.field_error_proc = Proc.new{ |html_tag, instance| "<span class=\"field_with_errors\">#{html_tag}</span>" }

Going through Trac, I see it’s been in there forever, but as usual, I’m the last one to catch it.

Awesomely useful. Thanks Rails Core.