There are a lot of questions about Nested Parameters, but I can't seem to find one that addresses my specific, simple situation.

I'm trying to permit a nested hash that is NOT an array. I expected this to work:

params.require(:book).permit(:title, :description, style: {:font, :color})

But it resulted in a syntax error.

This, however, worked:

params.require(:book).permit(:title, :description, style: [:font, :color])

But my issue with this, it it seems to permit style values that are arrays of items with attributes :font and :color. I only want to permit a single hash with those 2 attributes.

I've tried other variations, but I keep getting syntax errors. I'd appreciate any help with this.

Context: Rails 4.1.7, Ruby 2.0.0 (It's on my todo list to upgrade!), not using ActiveRecord.