cypriss/mutations — pull request #44 by GavinJoyce (2013-10-29 11:54:56+00:00)
Title: Add HashFilter :any option

This adds an `:any` option to `HashFilter` which defaults to `false`. When `true`, any value is permitted.

I have a number of models in my application which accept arbitrary JSON data from the user and I'd like to remove the need for serializing this data into a string when calling a mutation command. With this change, my commands look like:

``` ruby
class Update < Mutations::Command
required do
array :email_templates do
hash do
required do
integer :id
string :identifier
string :subject_template
end

optional do
string :from
string :text_template
string :html_template
hash :data, :any => true
end
end
end
end
end
```