Skip to content

Latest commit

 

History

History
64 lines (46 loc) · 1.31 KB

CHANGELOG.md

File metadata and controls

64 lines (46 loc) · 1.31 KB

[0.4.0] - 2022-09-25

  • Extract performs into the active_job-performs gem with some fixes and extra features, but include it as a dependency.

[0.3.0] - 2022-09-25

  • Add performs to help cut down Active Job boilerplate.

    class Post::Publisher < ActiveRecord::AssociatedObject
      performs :publish, queue_as: :important
    
      def publish
        
      end
    end

    The above is the same as writing:

    class Post::Publisher < ActiveRecord::AssociatedObject
      class Job < ApplicationJob; end
      class PublishJob < Job
        queue_as :important
    
        def perform(publisher, *arguments, **options)
          publisher.publish(*arguments, **options)
        end
      end
    
      def publish_later(*arguments, **options)
        PublishJob.perform_later(self, *arguments, **options)
      end
    
      def publish
        
      end
    end

    See the README for more details.

[0.2.0] - 2022-04-21

  • Require a has_object call on the record side to associate an object.

    class Post < ActiveRecord::Base
      has_object :publisher
    end
  • Allow has_object to pass callbacks onto the associated object.

    class Post < ActiveRecord::Base
      has_object :publisher, after_touch: true, before_destroy: :prevent_errant_post_destroy
    end

[0.1.0] - 2022-04-19

  • Initial release