Quantcast
Channel: User Schwern - Stack Overflow
Viewing all articles
Browse latest Browse all 581

Answer by Schwern for access concern method in a rails activeJob

$
0
0

include GenericMethods should simply go inside class SomeJob. Not inside a method. Then it injects its methods when the class loads.

class SomeJob < ApplicationJob  include GenericMethods  queue_as :default  def perform(days_ahead)    create_availabililty(days_ahead)  endend

Or if you want it applicable to every ApplicationJob, you'd put it in class ApplicationJob.


Viewing all articles
Browse latest Browse all 581

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>