Browse files

Allow to inject serialized patch before applying it

  • Loading branch information...
1 parent 48379c1 commit ee9d5d05ae49f57c180504c1f49af9ab91fae94d @thbar committed Jun 10, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/data_patcher.rb
View
4 lib/data_patcher.rb
@@ -6,10 +6,10 @@ class DataPatcher
# model: activerecord class
# key: unique key accross all model instances
- def initialize(model, key)
+ def initialize(model, key, patch={})
@model = model
@key = key
- @patch = {}
+ @patch = patch
end
# attributes hash must include key

0 comments on commit ee9d5d0

Please sign in to comment.