Closed tuanmai closed 5 years ago
I was trying to use clowne with sequel. One of my models doesn't have any association. And when I tried to clone that model, I encountered this error:
clowne
sequel
NoMethodError: undefined method `to_model' for nil:NilClass Did you mean? to_yaml # ./lib/clowne/adapters/sequel/operation.rb:27:in `to_record' # ./lib/clowne/utils/operation.rb:69:in `persist'
You can reproduce it by the integration test I wrote.
To fix that, I wrapped the cloned record before finding it in the @records
@records
@tuanmai thanks for your time!
Summary
I was trying to use
clowne
withsequel
. One of my models doesn't have any association. And when I tried to clone that model, I encountered this error:You can reproduce it by the integration test I wrote.
To fix that, I wrapped the cloned record before finding it in the
@records