Skip to content

Commit

Permalink
license
Browse files Browse the repository at this point in the history
  • Loading branch information
chikamichi committed Jul 27, 2009
1 parent cbfda9f commit bea1d5e
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 13 deletions.
14 changes: 14 additions & 0 deletions COPYING
@@ -0,0 +1,14 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004

Copyright (C) 2004 Sam Hocevar
14 rue de Plaisance, 75014 Paris, France
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. You just DO WHAT THE FUCK YOU WANT TO.

13 changes: 0 additions & 13 deletions README

This file was deleted.

37 changes: 37 additions & 0 deletions README.md
@@ -0,0 +1,37 @@
Marshalize
==========

This Rails plugin provides serialization using Marshal in the same way Rails provides builtin serialization using YAML. In a model, just do
class Robot < ActiveRecord::Base
marshalize :features
end
and your app will automagically handle the `features` attribute using Marshal, dumping when saving to the database, loading when fetching from it.

You can register any object.

Example
-------

class Robot < ActiveRecord::Base
marshalize :parameters # the "parameters" attribute will be saved as binary data
marshalize :features, RobotFeature # you can define what kind of object is to be marshalized
# an error will be raised if another class is provided for
# this attribute
serialize :status, Array # marshalization plays well with YAML classic serialization

end

TODO
----

* super() stuff
* manage blobs, not just text field (buffer limitations)


License
-------

Released under the WTFPL (http://sam.zoy.org/wtfpl/COPYING)

0 comments on commit bea1d5e

Please sign in to comment.