Padrino::ParamsProtection::ClassMethods

Module: Padrino::ParamsProtection::ClassMethods

Instance Method Summary

Instance Method Details

#params(*allowed_params) ⇒ Object

Implements filtering of url query params. Can prevent mass-assignment.

Examples:

post :update, :params => [:name, :email]
post :update, :params => [:name, :id => Integer]
post :update, :params => [:name => proc{ |v| v.reverse }]
p