Skip to content

HasOne Through Association support #1

@voltechs

Description

@voltechs

It appears associations such as

has_one :owner, through: -> { system_users.where(role: 'owner') }, source: :user, class_name: 'User'

Are supported in the Rails Console, however when used in DT::Responder, seem to fail with the following error.

Cannot have a has_one :through association 'System#owner' where the :through association 'System#system_users' is a collection. Specify a has_one or belongs_to association in the :through option instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions