Open noctivityinc opened 7 years ago
require 'paranoia'
in your ApplicationRecord
. That should do it.
Having the same issue. The above did not work.
@danielrhodes strange, that was the only thing I did to get it working on my side. Ruby version 2.4.1.
you can stop your Spring, and next again start app and is will work.
Still happening (same message as OP), no clue how I fixed it. Turned off the server, restarted the console and problem disappeared.
It's highly unlikely that this is a bug with paranoia itself. Paranoia uses ActiveSupport
to monkeypatch ActiveRecord::Base
once ActiveRecord is loaded. If that happened, the method will be defined.
Either paranoia wasn't required or ActiveSupport's on_load
feature isn't working as expected (or maybe something more specific to your apps.)
Has anyone gotten this gem to work with API only mode in Rails 5?