Set hash value instead of merge a single key, and use flatten! if possible
There's no need to create two extra hashes with options.merge(another_hash), with the goal of setting only one value, so lets just set it. Also refactor validates_each to use _merge_attributes, like other validates_* helpers do.
Showing
想要评论请 注册 或 登录