Skip to content

find with nil attribute #329

Closed
Closed
@danielwheeler1987

Description

@danielwheeler1987

Hello, so I have a concern related to the find method. I noticed that if for some reason the specified id for model record is nil and passed into the api find method it will interpolate the nil on the end of the query string when performing the request. This means the index action instead of the show action is called and returns the entire collection of specified model records. Wouldn't it be ideal for the api client lib to handle this nil behavior and throw a client error (argument error)? I would really like some feedback on this. I would prefer not to have to...

  1. Fork the lib.
  2. Handle nil checks via the consuming application.
  3. Write some custom hacks to handle checks in client wrappers.

Thanks, and TGIF :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions