Skip to content

column creator does not exist #27

@allenwq

Description

@allenwq

After #12, the creator association is delayed loaded. However, it breaks in the cases when columns is not called before the query is generated.

This can be reproduced in console:

> Course::Announcement.where(creator: current_user)

ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR:  column course_announcements.creator does not exist

 SELECT "course_announcements".* FROM "course_announcements" WHERE "course_announcements"."creator" = 15082

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