Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
additional packed fields to ActiveRecord::Base
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
.rspec
Gemfile
Gemfile.lock
MIT-LICENSE
README.markdown
Rakefile
VERSION
packed_fields.gemspec

README.markdown

packed_fields

Wrapper of ActiveRecord::Base.serialize

example

schema

ActiveRecord::Schema.define(:version => 1) do
  create_table :mixins do |t|
    t.column :packed, :text
  end
end

model

class Mixin < ActiveRecord::Base
  packed :fields => [:foo, :bar]
end

and using

m = Mixins.new
m.foo = 'blah'
m.save #=> #<Mixin id: 1, packed: {:foo=>"blah"}>
Something went wrong with that request. Please try again.