Skip to content

Use exists? instead of Array#include? method #77

@pjmartorell

Description

@pjmartorell

member.groups << self unless member.groups.include?(self)

exists? is more suitable to check if a given record already exists en the database, compared to Array#include?, which loads all records in the relation and loops over it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions