8000 Nested Attribute Code Smells with PT/PL/MP · Issue #11 · alexauritt/MathHotSpot · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Nested Attribute Code Smells with PT/PL/MP #11
Open
@alexauritt

Description

@alexauritt

There seems to be some needless hackery here.

  1. There was a bug for ProblemLevel#new -- we were previously unable to add a problem level to an empty ProblemType. The current fix is to explicitly build a new problem level for the problem type (@problem_level.problem_type.problem_levels.build) in ProblemLevel#create. Shouldn't be necessary, but without it, we get a ProblemType can't be blank error, even through level.problem_type reference seems fine.

  2. ProblemType currently expliclity initializes problem levels. ( before_validation :initialize_problem_levels, :on => :create, in ProblemType model.) Seems like this shouldn't be necessary.

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

      0