Ernie Miller

No, I don't work in NYC, DC, or the valley, and I'm cool with that.

RSS Feed

Tag Archives: valium

Valium 0.5.0, and the future of Valium/attr_bucket

0 Comments

I just released Valium 0.5.0. If you were getting single-element array values back when using value(s)_of against a loaded collection, this is now fixed. Thanks to gamov for the report! In other news, if you’ve been following Rails 3.2 news, you may have noticed that Rails core is getting functionality very similar to Valium and attr_bucket, two of my smaller gems. What’s that mean for these gems?

Read the rest of this post

Filed under Blog
Jan 11, 2012

Valium 0.4.0 released, now with 100% more English

0 Comments

Just a quick update about Valium 0.4.0. In 0.3.0, I enabled support for extracting attribute values from associations (a la User.posts[:id]). That was awesome, but as it turns out, not too compatible with 3.0.x associations.
Read the rest of this post

Filed under Blog
Sep 9, 2011

The Cure for ActiveRecord Instantiation Anxiety: Valium

14 Comments

No, not the drug — the Ruby gem! Have you ever written code like this?

Model.where(:attribute => 'value').map(&:id).each do |model_id|
  # ...
end

I’m guessing you have, even if only as you were just getting started learning Rails/Ruby. It’s a bad idea.

Read the rest of this post

Filed under Blog
Aug 24, 2011

About

I'm Ernie Miller. But then, you probably knew that by looking at the page title, or the URL. I'm a Ruby programmer in Louisville, Kentucky. This blog used to be called "metautonomo.us", which I thought was kind of clever, but nobody, including me, could type it. Lesson learned.