Skip to content

has_many, through #14

@swilliams

Description

@swilliams

Need to enable has_many through relationships. Example

class Resource
end

class Role
  has_many :resources
end

class User
  has_many :roles
  has_many :resources, through: :roles
end

This means that User instances have a list of Resources that are provided by their Roles list.

As of now this can be done by 'plucking' the Resources property from each Role on a User. However, this would also result in an HTTP call for each Role, which would be very slow. Consider creating an :include functionality first.

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