Sha256: b73d70ceae242e1c33d226b43d522bd4211cfff847069bacef5d5839e7450265

Contents?: true

Size: 698 Bytes

Versions: 1

Compression:

Stored size: 698 Bytes

Contents

any_strong_parameter
====

This is a gemified version of the pull request in https://github.com/rails/strong_parameters/pull/231, tested with Rails 4.2.7.1 and Rails 5.0.0.

[This comment](https://github.com/rails/rails/issues/9454#issuecomment-242847373) explains it pretty well:

![img](http://take.ms/hKtWKi)

### Usage

```rb
# Given a params hash:
#
# {
#   product: {
#     name: 'Foo',
#     data: {
#       custom: 'metadata',
#       goes: 'here'
#     }
#   }
# }

def product_params
  params.require(:product).permit(
    :name,
    :description,
    data: AnyStrongParameter::ANY
  )
end

# =>
# {
#   name: 'Foo',
#   data: {
#     custom: 'metadata',
#     goes: 'here'
#   }
# }
```

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
any_strong_parameter-0.0.1 README.md