tag:blogger.com,1999:blog-7821856652257554779.post8070818068099242697..comments2023-10-22T12:47:47.534+02:00Comments on Andrzej on Software: Splitting a Rails controllerAndrzej Krzywdahttp://www.blogger.com/profile/06399276063142826365noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-7821856652257554779.post-48926120013413286682015-02-05T02:29:17.688+01:002015-02-05T02:29:17.688+01:00One of the reasons to move the action to another c...One of the reasons to move the action to another controller is to decouple those actions from each other. <br /><br />If your actions are fully isolated already, then you don't gain much. However, if the actions share some private methods or filters, you've got coupling.<br /><br />Sometimes, such coupling is not bad on its own. It's bad, when you're scared of changing code, because too many actions rely on it. In such cases, splitting a controller may make sense.Andrzej Krzywdahttps://www.blogger.com/profile/06399276063142826365noreply@blogger.comtag:blogger.com,1999:blog-7821856652257554779.post-84607951591048197952015-02-04T18:40:40.210+01:002015-02-04T18:40:40.210+01:00I enjoy the post. However, I do not really see th...I enjoy the post. However, I do not really see the benefit. Let's saying it's not a CRUD action-- call it MetricProductsController with action metric. <br /><br />What's the benefit of abstracting these methods to another controller with essentially the same name? Instead of hunting and pecking within the controller space, now you are hunting and pecking through out the controller folders. For someone that'd be new to the code base, this could add another level of complexity.<br /><br />Open to any answers.Anonymousnoreply@blogger.com