No commit activity in last 3 years
No release in over 3 years
Binary Plist (CFPropertyList) renderer for rails3/4 apps.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 3, < 5
 Project Readme

CFPropertyList-rails

Render CFPropertyLists in Rails3 apps. Plists are generated in binary format.

Binary Plists are small in size and therefore ideal for usage with mobile iOS clients, such as iPhone and iPad.

Usage

In your Gemfile:

gem 'CFPropertyList-rails'

In a controller, use something like this:

respond_to do |format|
  format.html
  format.plist { render :plist => posts }
end

You can use all the options you would use with the json renderer, e.g.:

respond_to do |format|
  format.plist { render :plist => posts, :include => :comments }
end

There is an additional option you can use to skip the serialization done by the gem. This is useful in situations when a custom serialization was applied before:

respond_to do |format|
  posts = posts.as_json(:include => :comments)
  format.plist { render :plist => posts, :skip_serialization => true }
end

Changelog

  • 1.0.3 - 15.07.2020

    • update dependency to CFPropertyList ~> 2.3
  • 1.0.2 - 26.02.2013

    • update dependency to Rails >=3, <5
  • 1.0.1 - 14.12.2012

    • update dependency to CFPropertyList ~> 2.2.0
  • 1.0.0 - 08.02.2012

    • add skip_serialization option
    • remove old monkey path since CFPropertyList has fixes included since 2.0.17
  • 0.0.1 - 12.05.2011

    • initial release

License

Copyright (c) 2011-2012 Matthias Schmidt, http://m-schmidt.eu/

CFPropertyList-rails is released under the MIT License

Credits

Written by Matthias Schmidt

Thanks to Christian Kruse for the CFPropertyList ruby implementation!