In my plugin I'm inheriting few models from the engine and adding Mobility settings.
# my enginge
module MyEngine
class Foo < ApplicationRecord
def self.say_hi
return "hi"
end
end
end
# my plugin
require 'my-engine'
module MyEngine
class Foo
include Mobility
translates :name, type: :string
end
end
Now if I look for the model in Rails console:
MyEngine::Foo.say_hi
ArgumentError: KeyValue backend can only be used by ActiveRecord or Sequel models
If I comment out Mobility settings everything works:
MyEngine::Foo.say_hi
=> "hi"
How to extend in my app an AR model MyEngine::Foo
so Mobility doesn't complain?