Skip to content
This repository has been archived by the owner on Sep 25, 2020. It is now read-only.

Latest commit

 

History

History
29 lines (19 loc) · 540 Bytes

README.rdoc

File metadata and controls

29 lines (19 loc) · 540 Bytes

Marshaled Attributes

Save marshaled objects using ActiveRecord.

Instalation

gem install marshaled_attributes

Usage

Considering the following schema:

create_table :pages do |t|
  t.string 	:name
  t.text 	:body
  t.binary 	:meta
end

Add the method call marshaled to your model.

class Page < ActiveRecord::Base
  marshaled :meta
end

@page = Page.new(:meta => {:last_comment_id => 100})
@page.meta
#=> {:last_comment_id => 100}

Copyright © 2008 Nando Vieira, released under the MIT license