DmitryTsepelev / ar_lazy_preload

Lazy loading associations for the ActiveRecord models
MIT License
677 stars 24 forks source link

Issue-49 fix - add prefix to `owner` attribute #50

Closed RuslanKhabibullin closed 3 years ago

RuslanKhabibullin commented 3 years ago

https://github.com/DmitryTsepelev/ar_lazy_preload/issues/49

PikachuEXE commented 3 years ago

Would be good to have test cases that reproduce what's fixed

RuslanKhabibullin commented 3 years ago

@PikachuEXE I've added a simple spec that checks that there are no exceptions for entities with owner enum value. An error can be reproduced with the next Gemfile.local file + old AssociationRelation class (with owner delegation without prefix):

source 'https://rubygems.org'

gem "sqlite3", "~> 1.4"
gem "rails", "~> 6.1.1"
coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 838492722


Totals Coverage Status
Change from base Build 620335788: 0.0%
Covered Lines: 264
Relevant Lines: 266

💛 - Coveralls
coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 849071793


Totals Coverage Status
Change from base Build 620335788: 0.0%
Covered Lines: 264
Relevant Lines: 266

💛 - Coveralls
RuslanKhabibullin commented 3 years ago

@DmitryTsepelev thank you for your review! Seems like done.