Merge server and rails_3_1

This commit is contained in:
chris2tof committed 2011-08-18 13:43:33 +08:00
1 parent d2c2e174ac
commit 86443661e9
42 files changed
+274 -190

No files matched your search

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+3
View File
@@ -0,0 +1,3 @@
class PDesign < Purchase
end
+11
View File
@@ -0,0 +1,11 @@
class Purchase
include Mongoid::Document
include Mongoid::Timestamps
field :purchase_id
field :title
field :author
field :intro
field :downloaded
end
+17
View File
@@ -6,4 +6,21 @@ class Site
field :in_use_locales, :type => Array
field :valid_locales, :type => Array
field :roaming_id
field :private_key, :type => Binary
field :public_key, :type => Binary
field :school
field :department
def generate_keys
private_key = OpenSSL::PKey::RSA.generate(2048)
self.public_key = private_key.public_key.to_s
self.private_key = private_key.to_s
end
def registered?
!self.roaming_id.blank?
end
end
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.