Skip to content

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

Open
@tdstein

Description

@tdstein

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingThis is a breaking changesdkUsed for automation

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions