Skip to content

Person#question_sets should allow instantiation of a QuestionSet #34

Description

@OfTheDelmer

When chaining methods for BlockScore::Person

person = BlockScore::Person.retrieve("some_id")
person.question_sets.new
#=> NoMethodError: undefined method `new' for #<BlockScore::QuestionSet:0x007fb41c4fd3c8>

This is due to the person.question_sets returning a BlockScore::Collection that has a @target which is an instance of BlockScore::QuestionSet, but also, the BlockScore::Collection sends missing method calls directly to the instance. TheBlockScore::QuestionSet instance does not know to delegate this particular method to the self.class.

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