Fix the generator

Since the change from JSON to YML, this generator is broken. Update the code to make it work.
I think that's better, i've seen it done that way in other places and I _think_ it's more rails-y.

(I think I added the single-string version in laziness.)