Activerecord::SerializeCoders
ActiveRecord serialize coders
Installation
Add this line to your application's Gemfile:
gem 'activerecord-serialize_coders'
And then execute:
$ bundle
Or install it yourself as:
$ gem install activerecord-serialize_coders
Usage
your app/models/user.rb
serialize :module_ids, ::ActiveRecord::Coders::StringIdsColumn.new
# or
serialize :module_ids, ::ActiveRecord::Coders::StringIdsColumn.new(require_update: true)
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request