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

Rename resource methods to mimic Ruby on Rails ActiveRecord naming conventions #294

Open
tdstein opened this issue Sep 13, 2024 · 0 comments
Labels
breaking This is a breaking change sdk Used for automation
Milestone

Comments

@tdstein
Copy link
Collaborator

tdstein commented Sep 13, 2024

In #16, we choose method names for the resource implementations (e.g., find, find_one, create) using our best guess at the time. Since then, I have realized that our implementations mimic the Ruby on Rails ActiveRecord API in many ways. Since Ruby on Rails is battle-tested, I feel confident that mimicking the ActiveRecord API through the following migration will result in a more approachable API.

Rename the following methods:

  • find -> find_by
  • find_one -> first
  • delete -> destroy
  • get -> find*

*The find method is unique because it continues to exist, but the functionality will completely change.

These methods are not impacted:

  • count
  • create
  • update
@github-actions github-actions bot added the sdk Used for automation label Sep 13, 2024
@tdstein tdstein added the breaking This is a breaking change label Sep 13, 2024
@tdstein tdstein added this to the 1.0.0 milestone Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking This is a breaking change sdk Used for automation
Projects
None yet
Development

No branches or pull requests

1 participant