lib/enum_definition.rb in ar-enums-0.3.1 vs lib/enum_definition.rb in ar-enums-0.3.2

- old
+ new

@@ -17,10 +17,14 @@ define_enum_getter_and_setter field, enums end private def asume_external_style field - lambda { |options| field.external_class(options).all } + lambda { |options| external_class(field, options).all } + end + + def external_class field, options = {} + compute_type options.delete(:class_name) || field.name.camelize end def define_enums_getter field, enums meta_def(field.enums_getter) { enums } end \ No newline at end of file