There is no need to make the DRY code as you stated. Think about it, one of the main goals of creating your DRY code is that if you update the code in one place, you wonβt have to update the code in another place. However, in your case, if you update your code in controller X, what are the chances that you will make the same change in controller Y? If not, then this is not a good candidate for abstraction. (In fact, if you are even going to remotely change something in X that does not affect Y, then this is a bad candidate for DRY)
As a rule, abstraction is good. However, excessive abstraction is not very good and should be avoided.
Ken li
source share