Sha256: d47c1a10211470ffa83245614bf01a4e2181a0ed37e58177c4d83ec62866371c

Contents?: true

Size: 1.31 KB

Versions: 12

Compression:

Stored size: 1.31 KB

Contents

## [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.

  ```ruby
  class Post::Publisher < ActiveRecord::AssociatedObject
    performs :publish, queue_as: :important

    def publish
      …
    end
  end
  ```

  The above is the same as writing:

  ```ruby
  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.

  ```ruby
  class Post < ActiveRecord::Base
    has_object :publisher
  end
  ```

- Allow `has_object` to pass callbacks onto the associated object.

  ```ruby
  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

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
active_record-associated_object-0.9.1 CHANGELOG.md
active_record-associated_object-0.9.0 CHANGELOG.md
active_record-associated_object-0.8.3 CHANGELOG.md
active_record-associated_object-0.8.2 CHANGELOG.md
active_record-associated_object-0.7.1 CHANGELOG.md
active_record-associated_object-0.7.0 CHANGELOG.md
active_record-associated_object-0.6.0 CHANGELOG.md
active_record-associated_object-0.5.2 CHANGELOG.md
active_record-associated_object-0.5.1 CHANGELOG.md
active_record-associated_object-0.5.0 CHANGELOG.md
active_record-associated_object-0.4.1 CHANGELOG.md
active_record-associated_object-0.4.0 CHANGELOG.md