Releases: kaspth/active_record-associated_object
v0.8.1
v0.8.0
v0.7.1
What's Changed
- Fix: Extensions aren't loaded in development/test by @natematykiewicz in #21
Full Changelog: v0.7.0...v0.7.1
v0.7.0
What's Changed
-
Improve object shape friendliness by @natematykiewicz in #20, see also 16ae755 for documentation changes.
-
Allow Associated Objects to extend their Active Record by @kaspth in #19
This changes Associated Object classes to be eager-loaded whenhas_object
is called.Then we can add an
extension
method to integrate into the Active Record class:class Post < ApplicationRecord has_object :publisher end # app/models/post/publisher.rb class Post::Publisher < ActiveRecord::AssociatedObject extension do # Here we're within Post and can extend it: has_many :contracts, dependent: :destroy do def signed? = all?(&:signed?) end def self.with_contracts = includes(:contracts) after_create_commit :publish_later, if: -> { contracts.signed? } # An integrating method that operates on `publisher`. private def publish_later = publisher.publish_later end end
See the README section for more detail.
Internal changes
- Bump supercharge/redis-github-action from 1.7.0 to 1.8.0 by @dependabot in #17
- README: Link to active_job-performs [ci skip] by @olleolleolle in #18
Full Changelog: v0.6.0...v0.7.0
v0.6.0
What's Changed
-
Refit entire explanation in README by @kaspth in #15
Hopefully this should explain more of what this gem is aiming to do and is easier to share with coworkers, if you're looking to adopt this gem. -
Minimally require Ruby 3.0 by @kaspth in #16
We were already requiring Ruby 3.0, but it just wasn't reflected in thegemspec
.
Full Changelog: v0.5.2...v0.6.0
v0.5.2
What's Changed
- Fix eager loading a Rails app with
performs
in an associated object by @natematykiewicz in #14
Full Changelog: v0.5.1...v0.5.2
v0.5.1
What's Changed
- Drop outdated comments from active_record-associated_object.gemspec by @olleolleolle in #11
- Test support for Active Record's composite primary keys by @kaspth in #12
- Mention composite primary key support by @kaspth in 0c1f932
- Add support for namespaced models by @kaspth in #13
Full Changelog: v0.5.0...v0.5.1
v0.5.0
What's Changed
Breaking change
To update and get the same behavior, you must explicitly put active_job-performs
in your Gemfile:
gem "active_job-performs"
gem "active_record-associated_object"
Fixes
- Require the version file by default by @natematykiewicz in #8
- Fix support for multiple AssociatedObjects in an app by @natematykiewicz in #9
Full Changelog: v0.4.1...v0.5.0
v0.4.1
What's Changed
- Fix ActiveJob::DeserializationError by @natematykiewicz in #7
Maintenance
- Use dependabot to update GitHub Actions by @olleolleolle in #4
- Bump actions/checkout from 3 to 4 by @dependabot in #5
- Bump supercharge/redis-github-action from 1.2.0 to 1.7.0 by @dependabot in #6
New Contributors
- @dependabot made their first contribution in #5
- @natematykiewicz made their first contribution in #7
Full Changelog: v0.4.0...v0.4.1