undefined method `klass' for nil:NilClass (NoMethodError)
Closed this issue · 2 comments
backward-crazy-mage-puppy-36 commented
Hi,
My environment details are:
MacOS Ventura, M1
Rails 7.0.2.4
Ruby 3.1.2p20
On running
OccamsRecord.query(DataVendors::NationalStockExchange::BhavCopy.all)
I am getting the following error:
gems/occams-record-1.3.0/lib/occams-record/query.rb:54:in initialize': undefined method
klass' for nil:NilClass (NoMethodError)
@model = scope.klass
^^^^^^
jhollinger commented
That suggests that scope
(i.e. DataVendors::NationalStockExchange::BhavCopy.all
) is nil
. Is there anything odd about that class? Maybe all
is overridden?
jhollinger commented
Closing due to inactivity