inossidabile / protector

Comfortable (seriously) white-list security restrictions for models on a field level
MIT License
270 stars 31 forks source link

Whitelist params for build #70

Open CyborgMaster opened 8 years ago

CyborgMaster commented 8 years ago

Protector already handles whitelisting strong params for new create and update:

Model.new(params)
Model.create(params)
Model.first.update(params)

but it doesn't currently handle building off of an association:

associated = Model.first.associated_model.build(params)

This PR adds that capability.