Commit e6efedc9 authored by Mehmet Emin INAC's avatar Mehmet Emin INAC Committed by Ash McKenzie

Apply 1 suggestion(s) to 1 file(s)

parent 9214f11d
...@@ -79,6 +79,7 @@ class ApplicationRecord < ActiveRecord::Base ...@@ -79,6 +79,7 @@ class ApplicationRecord < ActiveRecord::Base
end end
def self.declarative_enum(enum_mod) def self.declarative_enum(enum_mod)
enum enum_mod.key => enum_mod.definition.transform_values { |v| v[:value] } values = enum_mod.definition.transform_values { |v| v[:value] }
enum(enum_mod.key => values)
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment