This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
MIT-LICENSE | Tue Sep 23 16:15:19 -0700 2008 | |
| |
README.markdown | Tue Sep 23 16:15:19 -0700 2008 | |
| |
init.rb | Tue Sep 23 16:15:19 -0700 2008 | |
| |
lib/ | Tue Sep 23 16:15:19 -0700 2008 | |
| |
specs/ | Tue Sep 23 16:15:19 -0700 2008 |
README.markdown
marshaled_attributes
A simple plugin for saving marshaled objects using ActiveRecord.
Instalation
Install the plugin with script/plugin install git://github.com/fnando/marshaled_attributes.git
Usage
Considering the following schema:
create_table :pages do |t|
t.string :name
t.text :body
t.binary :meta
end
1) Add the method call marshaled_attributes to your model.
class Page < ActiveRecord::Base
marshaled_attributes :meta
end
@page = Page.new # => do not mass-assign the marshaled attributes.
@page.meta = {:last_comment_id => 100}
IMPORTANT: Remember NOT to mass-assign the attributes you want to be marshaled.
Copyright (c) 2008 Nando Vieira, released under the MIT license







