Class: ActiveRecord::PredicateBuilder
- Inherits:
-
Object
- Object
- ActiveRecord::PredicateBuilder
- Defined in:
- lib/classy_enum/active_record.rb
Instance Method Summary collapse
Instance Method Details
#build_from_hash_with_classy_enum(attributes, default_table) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/classy_enum/active_record.rb', line 3 def build_from_hash_with_classy_enum(attributes, default_table) # Convert classy enum values to strings attributes.map do |column, value| attributes[column] = value.to_s if value.is_a? ClassyEnum::Base end build_from_hash_without_classy_enum(attributes, default_table) end |