Skip to content
New issue

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

Namespaced record class breaks inet_contains #25

Closed
znakaska opened this issue Jun 30, 2019 · 0 comments · Fixed by #26
Closed

Namespaced record class breaks inet_contains #25

znakaska opened this issue Jun 30, 2019 · 0 comments · Fixed by #26

Comments

@znakaska
Copy link
Contributor

When calling .where.inet_contains on a namespaced model, an exception is raised:

My::Namespaced::Model.where.inet_contains(cidr: '127.0.0.1')

# uninitialized constant MyNamespacedModel (NameError)

The following line tries to determine record class from table name:

left_column = object.left.relation.name.classify.constantize.columns.detect do |col|
matchable_column?(col, object)
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant