Releases: kaspth/active_record-associated_object
v0.8.3
What's Changed
- Mention
seats
&entitlements
style naming recommendation in README by @kaspth in 0e207cb - Mention RubyVideo's usage for new users to learn how these work by @kaspth in d239990
- Document how to write Polymorphic Associated Objects via modules by @kaspth in #30
- Fix ActiveJob::Performs not being automatically extended by @kaspth in #31
Full Changelog: v0.8.2...v0.8.3
v0.8.2
What's Changed
- Fix generated associated_object_path for CamelCase class names by @itsameandrea in #26
New Contributors
- @itsameandrea made their first contribution in #26
Full Changelog: v0.8.1...v0.8.2
v0.8.1
What's Changed
- More descriptive error message when an associated object class is missing by @kaspth in #24
- Add associated object generator by @kaspth and @garrettdimon in #23
Full Changelog: v0.8.0...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