diff --git a/init.rb b/init.rb index 575a517..f4e6508 100644 --- a/init.rb +++ b/init.rb @@ -1,4 +1,10 @@ require 'plistifier/plist_encoding' require 'rails_extensions' -Mime::Type.register "application/plist", :plist \ No newline at end of file +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 \ No newline at end of file