Class: ActiveRecordDataLoader::ActiveRecord::EnumValueGenerator
- Inherits:
-
Object
- Object
- ActiveRecordDataLoader::ActiveRecord::EnumValueGenerator
- Defined in:
- lib/active_record_data_loader/active_record/enum_value_generator.rb
Class Method Summary collapse
Class Method Details
.generator_for(model_class:, ar_column:, connection_factory:) ⇒ Object
7 8 9 10 |
# File 'lib/active_record_data_loader/active_record/enum_value_generator.rb', line 7 def generator_for(model_class:, ar_column:, connection_factory:) values = enum_values_for(ar_column.sql_type, connection_factory) -> { values.sample } end |