Skip to content

Warning of hierarchy class constant already defined #362

Open
@ryanb

Description

@ryanb

I'm seeing warnings in the log when reloading a page in development after altering a model that has closure_tree added.

/Users/rbates/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/closure_tree-7.1.0/lib/closure_tree/support.rb:36: warning: already initialized constant CategoryHierarchy
/Users/rbates/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/closure_tree-7.1.0/lib/closure_tree/support.rb:36: warning: previous definition of CategoryHierarchy was here

I've tested this in a new Rails app and confirmed it happens in the latest version of Rails (6.0.2.2).

I haven't noticed any other issues, but it would be nice to remove these warnings.

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