Minor refactoring in Active Record model schema methods
* Use each_key instead of generating intermediate keys array. * Use each_with_object instead of inject to build hash. * Use ternary to return instead of if + assignment.
Showing
想要评论请 注册 或 登录