first commit

This commit is contained in:
Jeena Paradies 2010-06-12 17:59:50 +02:00
commit 2bba8c5fee
122 changed files with 8389 additions and 0 deletions

40
README Normal file
View file

@ -0,0 +1,40 @@
Plistifier
==========
Adds the ActiveRecord#to_plist and Array#to_plist methods similar to ActiveRecord#to_xml.
The :only, :except, :methods, and :include options are supported.
It too ads the :plist option to the ActiveRecord::Base#render method
Example
=======
def index
@posts = Post.all
respond_to do |format|
format.html # index.html.erb
format.xml { render :xml => @posts }
format.plist { render :plist => @posts, :only => [:id, :title] }
end
end
def show
@post = Post.find(params[:id])
respond_to do |format|
format.html # show.html.erb
format.xml { render :xml => @post }
format.plist { render :plist => @post }
end
end
Thanks
======
This plugin uses Christian Kruses CFPropertyList http://rubyforge.org/projects/cfpropertylist/
to generate Plists.
Copyright (c) 2010 Jeena Paradies, released under the MIT license