Gem attr_accessible2strong_params,一个 Rails 3 attr_accessible 到 Rails 4 strong params 自动转换程序

ericguo · October 04, 2014 · Last by ericguo replied at October 05, 2014 · 2282 hits

attr_accessible2strong_params试图自动解决 rails 3 的 protected attributes 到 rails 4 的 strong parameters 的转换问题。

第一次写 gems,用到了一些 parser ruby 源代码和直接修改源代码的技巧,可以看看。

2 Floor has deleted

貌似有些边界条件没考虑到

#3 楼 @42thcoderissue啦,不过我手头的确有一个 400+ Model 文件的项目,要从 protected attributes 转到 strong parameters,所以慢慢会更完善的。

You need to Sign in before reply, if you don't have an account, please Sign up first.