Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaks on Rails 5.2.5 #48

Closed
Sam-Killgallon opened this issue Mar 30, 2021 · 0 comments · Fixed by #49
Closed

Breaks on Rails 5.2.5 #48

Sam-Killgallon opened this issue Mar 30, 2021 · 0 comments · Fixed by #49

Comments

@Sam-Killgallon
Copy link
Contributor

Hi, I've just updated to Rails 5.2.5 from 5.2.4.4 and came across an issue.

Starting the app gives this error:

NameError:
       undefined local variable or method `options_for_through_record' for #<ActiveRecord::Associations::HasManyThroughAssociation:0x00007f23ccc9ce20>
     # /usr/local/bundle/gems/store_base_sti_class-2.0.2/lib/store_base_sti_class_for_5_2.rb:138:in `build_through_record'

I took a look into it and it appears to be because of

if ActiveRecord::VERSION::STRING =~ /^5\.2\.4/
where the gem has a special case for 5.2.4, which doesn't match for 5.2.5 and so we drop into the else branch.

Patching it locally to catch 5.2.5 as well appears to work with our test suite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant