title: How to share code between a job and a controller
body: <p>I have some functionality in a controller that I <strong>also</strong> want in a background job (ActiveJob). If the code was all equal in both, to avoid code duplication, I guess the proper way would be to move the shared functionality to the job, and execute the job (<code>perform_now</code>) from the controller?</p>
  
  <p>But what if the code is not all equal, where i only need some of the methods in both, what would be the proper way to tho this? Would it be to move the shared code to</p>
  
  <ul>
  <li>public class methods in the job class, and call these from the controller?</li>
  <li>libs? (Or are they too general?)</li>
  <li>concerns?</li>
  <li>helpers? </li>
  </ul>
  
  <p>What would be the proper way to share methods between a job and a controller? How do you guys do this?</p>