-
Notifications
You must be signed in to change notification settings - Fork 82
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 querying not working in > 0.1.14 #41
Comments
Thanks! Yes the deprecation issues in Rails 5.1 (I guess that's what you're using?) are a known issue. It's top on my priority issues to fix. I know basically what's going wrong but I need a bit of time to fix it. That said, I haven't seen any actual exceptions, and certainly specs would be failing if something as simple as Can you show me what's in your User model? Do you have |
Never mind, I see from your console snippet that you are using AR 5.1. So the deprecation errors are a known issue in that version. Again, though, the exception is very strange... |
What backend are you using btw? Probably not related but just in case. |
Ah, yes I have a
Do you have an Idea why this breaks it? Other query methods aren't working either e.g. |
I will check this out probably early next week, but seems to be limited to your use of |
I have the same problem. |
@ArturLyapin Thanks, that gist helps a lot. I'll look into it now. |
@goalaleo @ArturLyapin I've released 0.1.17 which should fix the STI issues. Deprecation warnings in Rails 5.1 are not fixed yet, I know they are very noisy so I will try to fix them in the next week or so, but code should work in 5.1, just ignore the warnings for now. |
@goalaleo The deprecation warnings issue has been fixed on the master branch. I'll release a new version in the next day or so but if you want to get rid of them, just use master: gem 'mobility', github: 'shioyama/mobility' And |
@shioyama great news - thanks for the info! I'll wait until the official release. |
0.1.18 has been released, give it a try 😄 |
@shioyama seems to work for me - no more deprecation warnings. Cheers 👏 ! |
Behaviour in
0.1.14
Behaviour in
0.1.15
and0.1.16
Coming from this line: https://github.com/rails/rails/blob/v5.1.0/activerecord/lib/active_record/relation/delegation.rb#L5
I wanted to upgrade the gem, because I was getting a lot of these deprecation warnings:
line causing them is just
user.save!
, and a colleague thought that they might be coming from mobility. Seems like this is related rails/rails#28640The text was updated successfully, but these errors were encountered: