-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
I just tried to use redic-pool 1.0.1 with ohm 2.3.0 and was unable to. The console throws a NoMethodError for call!. For example:
require 'redic/pool'
require 'ohm'
Ohm.redis = Redic::Pool.new('redis://localhost:6379', size: 10)
class Event < Ohm::Model
attribute :name
index :name
end
event = Event.create :name => '12345'
This returns the following error:
NoMethodError: undefined method `call!' for #<Redic::Pool:0x007fa80a4497b0>
from /ohm-2.3.0/lib/ohm.rb:1356:in `script'
from /ohm-2.3.0/lib/ohm.rb:1307:in `save'
from /ohm-2.3.0/lib/ohm.rb:1085:in `create'
from (irb):8
from /ruby-2.2.4/bin/irb:11:in `<main>'
I added an initializer to my Rails app and patched in a call! method:
class Redic::Pool
def call!(*args)
call(*args)
end
end
And now it works:
event = Event.create :name => '12345'
{
:id => "1"
}
This was changed in
soveran/ohm@0329638#diff-c5131c4dd0972eeb4457be00b359be14, line 1356, and was documented in https://github.com/soveran/ohm/blob/master/CHANGELOG.md#230.
Will you accept a pull request?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels