We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Model.where(associatable: item).first doesn't work and raise an error.
Model.where(associatable: item).first
The text was updated successfully, but these errors were encountered:
Here, we can see the error
rails_1 | rails_1 | NoMethodError (undefined method `id' for nil:NilClass): rails_1 | /usr/local/bundle/gems/nobrainer-0.43.0/lib/no_brainer/document/association/belongs_to.rb:103:in `cast_attr' rails_1 | /usr/local/bundle/gems/nobrainer-0.43.0/lib/no_brainer/document/association.rb:27:in `association_user_to_model_cast' rails_1 | /usr/local/bundle/gems/nobrainer-0.43.0/lib/no_brainer/criteria/where.rb:200:in `cast_key_path' rails_1 | /usr/local/bundle/gems/nobrainer-0.43.0/lib/no_brainer/criteria/where.rb:96:in `simplify' rails_1 | /usr/local/bundle/gems/nobrainer-0.43.0/lib/no_brainer/criteria/where.rb:48:in `map' rails_1 | /usr/local/bundle/gems/nobrainer-0.43.0/lib/no_brainer/criteria/where.rb:48:in `simplify' rails_1 | /usr/local/bundle/gems/nobrainer-0.43.0/lib/no_brainer/criteria/where.rb:48:in `map' rails_1 | /usr/local/bundle/gems/nobrainer-0.43.0/lib/no_brainer/criteria/where.rb:48:in `simplify' rails_1 | /usr/local/bundle/gems/nobrainer-0.43.0/lib/no_brainer/criteria/where.rb:19:in `merge_where_ast' rails_1 | /usr/local/bundle/gems/nobrainer-0.43.0/lib/no_brainer/criteria/core.rb:39:in `call' rails_1 | /usr/local/bundle/gems/nobrainer-0.43.0/lib/no_brainer/criteria/core.rb:39:in `block in merge!' rails_1 | /usr/local/bundle/gems/nobrainer-0.43.0/lib/no_brainer/criteria/core.rb:36:in `each' rails_1 | /usr/local/bundle/gems/nobrainer-0.43.0/lib/no_brainer/criteria/core.rb:36:in `merge!' rails_1 | /usr/local/bundle/gems/nobrainer-0.43.0/lib/no_brainer/criteria/eager_load.rb:16:in `merge!' rails_1 | /usr/local/bundle/gems/nobrainer-0.43.0/lib/no_brainer/criteria/cache.rb:24:in `merge!' rails_1 | /usr/local/bundle/gems/nobrainer-0.43.0/lib/no_brainer/criteria/extend.rb:15:in `merge!' rails_1 | /usr/local/bundle/gems/nobrainer-0.43.0/lib/no_brainer/criteria/core.rb:45:in `merge' rails_1 | /usr/local/bundle/gems/nobrainer-0.43.0/lib/no_brainer/criteria/core.rb:56:in `chain' rails_1 | /usr/local/bundle/gems/nobrainer-0.43.0/lib/no_brainer/criteria/where.rb:11:in `where' rails_1 | /usr/local/bundle/gems/nobrainer-0.43.0/lib/no_brainer/document/criteria.rb:16:in `where'
Sorry, something went wrong.
No branches or pull requests
Model.where(associatable: item).first
doesn't work and raise an error.The text was updated successfully, but these errors were encountered: