Hi all.
What do you think about little improvements listed below?
before:
{ error: message }.merge(options.except(*CALLBACKS_OPTIONS + MESSAGE_OPTIONS)) after:
{ error: message }.merge**!**(options.except(*CALLBACKS_OPTIONS + MESSAGE_OPTIONS))
before:
matchers.map { |method| method.match(method_name) }.compact after:
matchers.map! { |method| method.match(method_name) }.tap(&:compact!)
before:
attribute_aliases.merge(new_name.to_s => old_name.to_s) after:
{new_name.to_s => old_name.to_s}.reverse_merge!(attribute_aliases)
I just started to dive into the Ruby on Rails. And maybe it’s not good idea to make this improvements. But if it’s OK, I would continue to improve somethign like that.
Regards, Dmitry