HTTParty#lock seems to be overriding ActiveRecord’s #lock method #740
-
When trying to implement pessimistic locking on a Rails model I wasn't able to do so because HTTParty#lock gets called rather than the ActiveRecord method with the same name. I'm using AR 6.1.4.1 and HTTParty 0.20.0.
Looks like the HTTParty code that's clobbering the AR method is within the HTTParty module line 587 as shown below.
I love HTTParty and want to keep using it. Any ideas for a solution, other than forking? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Solved. For some reason, I was explicitly including HTTParty on User, which was causing the problem. |
Beta Was this translation helpful? Give feedback.
Solved. For some reason, I was explicitly including HTTParty on User, which was causing the problem.