added Known problems
This commit is contained in:
parent
a4d8f1ab84
commit
071b06a9bf
1 changed files with 17 additions and 2 deletions
17
README
17
README
|
@ -8,7 +8,6 @@ the :plist_filename option to change the default name for download.
|
||||||
It too ads the :plist option to the ActiveRecord::Base#render method. With help of that
|
It too ads the :plist option to the ActiveRecord::Base#render method. With help of that
|
||||||
you get binary plist files which you can easy use in your iPhone.
|
you get binary plist files which you can easy use in your iPhone.
|
||||||
|
|
||||||
|
|
||||||
Install
|
Install
|
||||||
=======
|
=======
|
||||||
|
|
||||||
|
@ -55,6 +54,22 @@ On the iPhone use for example:
|
||||||
NSLog(@"Title: %@", [[posts objectAtIndex:0] objectForKey:@"title"]);
|
NSLog(@"Title: %@", [[posts objectAtIndex:0] objectForKey:@"title"]);
|
||||||
|
|
||||||
|
|
||||||
|
Known problems
|
||||||
|
==============
|
||||||
|
|
||||||
|
There is one problem though, If you want to do something like this it will crash:
|
||||||
|
|
||||||
|
@post = Post.all
|
||||||
|
myplist = { :foo => "bar", :post => @post }.to_plist
|
||||||
|
|
||||||
|
You have to convert the ActionRecord @post to a hash which CFPropertyList
|
||||||
|
understands and can convert for example like:
|
||||||
|
|
||||||
|
myplist = { :foo => "bar", :post => @post.to_hash }.to_plist
|
||||||
|
|
||||||
|
ActionRecord#to_hash is a method the plugin adds.
|
||||||
|
|
||||||
|
|
||||||
Thanks
|
Thanks
|
||||||
======
|
======
|
||||||
|
|
||||||
|
|
Reference in a new issue