Fix: "._type" to ".class"

This commit is contained in:
Christophe Vilayphiou committed 2012-07-30 17:21:37 +08:00
1 parent bb154f5be6
commit 7440727acd
10 files changed
+18 -18

No files matched your search

@@ -32,7 +32,7 @@ class Admin::PurchasesController < ApplicationController
public_key = OpenSSL::PKey::RSA.new(File.read(APP_CONFIG['main_public_key']))
encrypted_data = public_key.public_encrypt({:purchase_id => purchase.purchase_id,
:purchase_type => purchase._type,
:purchase_type => purchase.class,
:roaming_id => Site.find(session[:site]).roaming_id,
:url => url}.to_json)
@@ -43,7 +43,7 @@ class Admin::PurchasesController < ApplicationController
temp_file.write response.body
temp_file.rewind
zip_name = response['content-disposition'].split('filename=')[1].gsub(/[\\\"]|.zip/, '') rescue ''
case purchase._type
case purchase.class
when 'Pdesign'
unzip_design(temp_file, zip_name)
when 'PModuleApp'