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

Fix database access caused by calling primary_key #55

Conversation

felixbuenemann
Copy link
Collaborator

This fixes a regression caused by the change to allow customization of the primary key.

While calling primary_key on the model is the proper way to find it's pk, it caused a schema lookup which should be avoided in class methods so things like asset precompilation can be run without
a database present.

This fixes #54.

This fixes a regression caused by the change to allow customization of
the primary key. While calling `primary_key` on the model is the proper
way to find it's pk, it caused a schema lookup which should be avoided
in class methods so things like asset precompilation can be run without
a database.

This fixes amerine#54.
@felixbuenemann felixbuenemann merged commit 565c3fd into amerine:master Sep 8, 2016
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 this pull request may close these issues.

Avoid loading Database on acts_as_tree declaration
1 participant