Skip to content


beerlington edited this page · 2 revisions
Clone this wiki locally

Guide to upgrading to 3.x from previous versions of ClassyEnum

Upgrading from 2.x to 3.x

See notes below if moving from 1.x to 3.x

In addition to some removing a few unnecessary methods, there are changes to how enum classes are defined. The enum_classes macro has been removed in favor of inferring them from the subclass names. Subclasses must now follow a naming convention that uses the parent class as a namespace:


class Parent < ClassyEnum::Base
  enum_classes :child1, :child2

class ParentChild1 < Parent

class ParentChild2 < Parent


class Parent < ClassyEnum::Base

class Parent::Child1 < Parent

class Parent::Child2 < Parent

Upgrading from 1.x to 3.x

Prior to 2.0, enum classes were implicity defined and were only required when overriding methods or properties. As of 2.0, all enum classes must explicity subclass a child of ClassyEnum::Base. If you used the generator, there are no changes to the existing structure.

Built-in Formtastic support has been removed. See the note at the bottom of this readme for more information how how to enable it.

Something went wrong with that request. Please try again.