Skip to content
Browse files

MOre README content

  • Loading branch information...
1 parent e93b56b commit b9f09ec971346d0264061d02a5027af58ca2c965 @ywen2 ywen2 committed Mar 25, 2012
Showing with 15 additions and 1 deletion.
  1. +15 −1
@@ -41,7 +41,7 @@ You don't have to define the settings, the default ```redis_key_name``` is
-the default ```marshallable_converters``` is empty array
+the default ```marshallable_converters``` is an empty array
The meaning of ```marshallable_converters``` will be discussed in the next section.
@@ -65,6 +65,20 @@ When it is a class, the class must have a class method ```marshallable``` which
When it is a symbol, it means it is a built-in converter. For example ```:sequel_record_marshallable``` will convert a Mail::Message containg a singlton Sequel record into marshallable one by use Sequel's ```marshallable!``` method.
+Currently the built-in only converter is ```:sequel_record_marshallable```
+The order of the ```:marshallable_converters``` could be important. The gem always goes through the converters in the order.
+So for example, if you have:
+config.action_mailer.redis_cache_settings = { :marshallable_converters => [Marshallable::Attrubute2, Marshallable::Attrubute1] }
+The gem calls: ```object1 = Marshallable::Attrubute2.marshallable(mail)```, then it calls ```object2 = Marshallable::Attrubute1.marshallable(object1)```
+So if you must have ```attrubute1``` to be marshallable first, then make the ```attrubute2``` marshallable. You have to switch the order in this example.
## Contributing
1. Fork it

0 comments on commit b9f09ec

Please sign in to comment.
Something went wrong with that request. Please try again.