I am trying to create an enumeration on my model, and I would like one of the states to be "new"
eg.
enum status: { stale: 0, new: 1, converted: 2 }
The rails seem to reject it with the following error.
You tried to define an enum named "status" on the model "Lead", but this will generate a class method "new", which is already defined by Active Record.
I understand why this is happening, but I was wondering if there was a way around this?
enums ruby-on-rails-4
Ryan-neal mes
source share