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

ActiveRecord 5.0+ incompability #7

Open
aleksey-bitwine opened this issue Sep 8, 2017 · 1 comment
Open

ActiveRecord 5.0+ incompability #7

aleksey-bitwine opened this issue Sep 8, 2017 · 1 comment

Comments

@aleksey-bitwine
Copy link

Since ActiveRecord 5.0 the "[]" method is not called via method_missing: https://github.com/rails/rails/blob/v5.0.0/activerecord/lib/active_record/relation/delegation.rb#L39

So accounts[:outstanding, :liability, true] raises "ArgumentError: wrong number of arguments (given 3, expected 1..2)" exception.

I think that https://github.com/vitaly/debitcredit/blob/master/app/models/debitcredit/account.rb#L25 has to be renamed and "[]" can be an alias only (for backward compatibility)

aleksey-bitwine added a commit to barges/debitcredit that referenced this issue Sep 8, 2017
@aleksey-bitwine
Copy link
Author

I have created workaround: barges@78285a2

It works

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

No branches or pull requests

1 participant