Class: Maglev::LocalesType

Inherits:
ActiveRecord::Type::Json
  • Object
show all
Defined in:
app/types/maglev/locales_type.rb

Instance Method Summary collapse

Instance Method Details

#deserialize(value) ⇒ Object



5
6
7
# File 'app/types/maglev/locales_type.rb', line 5

def deserialize(value)
  (super || []).map { |attributes| Maglev::Site::Locale.new(**attributes.symbolize_keys) }
end