I have a model that uses a serialized column:
class Form < ActiveRecord::Base serialize :options, Hash end
Is there a way to make this serialization use JSON instead of YAML?
In Rails 3.1 you can just
class Form < ActiveRecord::Base serialize :column, JSON end
Hope that helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With