Store attributes in a blob in ActiveRecord models
Add this line to your application's Gemfile:
gem 'blobbet'
And then execute:
$ bundle
Or install it yourself as:
$ gem install blobbet
Include Blobbet into your model. Declare attributes using "blobbet". The default blob is "extras" but you may specify a different one. Use your attributes as usual.
class Gibblet < ActiveRecord::Base
include Blobbet
blobbet :size
blobbet :ratio, blob: "stuff"
blobbet :city
end
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
), with specs. - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request