added possibility to send plists as post parameters
This commit is contained in:
parent
0b53a7b9d6
commit
f60d7c5882
1 changed files with 7 additions and 1 deletions
8
init.rb
8
init.rb
|
@ -1,4 +1,10 @@
|
||||||
require 'plistifier/plist_encoding'
|
require 'plistifier/plist_encoding'
|
||||||
require 'rails_extensions'
|
require 'rails_extensions'
|
||||||
|
|
||||||
Mime::Type.register "application/plist", :plist
|
Mime::Type.register "application/plist", :plist
|
||||||
|
|
||||||
|
ActionController::Base.param_parsers[Mime::Type.lookup("application/plist")] = lambda do |body|
|
||||||
|
str = StringIO.new(body)
|
||||||
|
plist = CFPropertyList::List.new({:data => str.string})
|
||||||
|
CFPropertyList.native_types(plist.value)
|
||||||
|
end
|
Reference in a new issue