The current controllers use actions (files defined in app/actions directory) to handle the business logic of the application currently. So a Posts::CommentsController#create action will call a Posts::Comments::CreateAction defined in /app/actions/posts/comments/create_action.rb. The migration goal is to migrate these controllers to use a custom form object and policy modules instead of these actions. If i have a Posts::CommentsController the policy object should be Posts::CommentsPolicy and it should be defined in app/policies/posts/comments_policy.rb. For the create action of that controller they should be a Posts::Comments::CreateForm form object that should live in app/forms/posts/comments/create_form.rb. These guidelines define the patterns and principles for migrating from the "Action" pattern to the "Form Object & Policy Object" pattern. These practices ensure the codebase remains DRY, highly testable, and robust.
All n