class Klass < ApplicationRecord
enum dimension: { length: 'length', breadth: 'breadth' }
end
I'm getting the following error :-
ArgumentError: You tried to define an enum named "name" on the model "Klass", but this will generate a class method "length", which is already defined by ActiveRecord::Relation.
I just want to know what are my options to get dimension enum working with length as one of its value. Is it possible to create the enum without defining length method on the model ?
Thing.joins(:attributes).where(dimension: 'length', value: 15)queries?