now you can do ActiveRecord#to_plist again
This commit is contained in:
parent
071b06a9bf
commit
0b53a7b9d6
2 changed files with 9 additions and 4 deletions
|
@ -3,11 +3,16 @@ require "cfpropertylist/rbCFPropertyList"
|
||||||
module Plistifier #:nodoc:
|
module Plistifier #:nodoc:
|
||||||
module PlistEncoding
|
module PlistEncoding
|
||||||
|
|
||||||
# str = IO String
|
|
||||||
# reading plist.load(:data => str)
|
|
||||||
|
|
||||||
attr_accessor :plist_item_options
|
attr_accessor :plist_item_options
|
||||||
|
|
||||||
|
def to_plist(options = {})
|
||||||
|
plist_options = {
|
||||||
|
:converter_method => :to_plist_item,
|
||||||
|
:convert_unknown_to_string => true
|
||||||
|
}
|
||||||
|
to_hash(options).to_plist(plist_options)
|
||||||
|
end
|
||||||
|
|
||||||
def to_plist_item
|
def to_plist_item
|
||||||
to_hash(plist_item_options)
|
to_hash(plist_item_options)
|
||||||
end
|
end
|
||||||
|
|
Reference in a new issue