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

README: Update example ActiveRecord model #410

Merged
merged 1 commit into from
Mar 28, 2024

Conversation

franzliedke
Copy link
Contributor

In order to use the model to find individual records, the primary key must be explicitly defined.

At least that's my experience with PostgreSQL.

Also, see https://arjanvandergaag.nl/blog/view-backed-activerecord-models.html

@derekprior
Copy link
Contributor

Thank you. @calebhearth do you think we should include this in the generated model? https://github.com/scenic-views/scenic/blob/main/lib/generators/scenic/model/templates/model.erb

In order to use the model to `find` individual records, the primary key must be explicitly defined.

At least that's my experience with PostgreSQL.

Also, see https://arjanvandergaag.nl/blog/view-backed-activerecord-models.html
@derekprior derekprior merged commit 2534f20 into scenic-views:main Mar 28, 2024
8 checks passed
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.

None yet

2 participants