希望像 permit(健壮参数) 一样，不需要在后续的实际业务中关心参数过滤的问题
Though it's still buggy sometimes, I'd like to recommend you to check dry-validation out. I think you will like it. The hanami-validation project takes a lot from it.
#1 楼 @novtopro
Thank,I will seriously to check it
#1 楼 @novtopro 并不能像题目那样解决问题～希望有更好的方法
@breeze 我用的是 rails_param 包我自己 fork 了一个分支然后使用 optional 或者 requires 时候 会自动把参数名加到一个数组里面，然后写了一个 strong_params 方法可以调用
You have to figure out how to integrate the gem with you application by yourself. By the way, rails_param just sucks! It's ugly as far as I see.