active_record_to_simpledb 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/active_record_to_simpledb.gemspec +1 -1
- data/lib/active_record_to_simpledb.rb +7 -4
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.3
|
@@ -105,7 +105,7 @@ class ActiveRecordToSimpledb
|
|
105
105
|
elsif RAILS_ENV == "prueba"
|
106
106
|
ActiveRecordToSimpledb::Client.create(domain_name, self.attributes)
|
107
107
|
else
|
108
|
-
Resque.enqueue(ActiveRecordToSimpledb::JobQueue::Create, self.
|
108
|
+
Resque.enqueue(ActiveRecordToSimpledb::JobQueue::Create, self.class.name, domain_name , self.id)
|
109
109
|
end
|
110
110
|
end
|
111
111
|
|
@@ -123,11 +123,14 @@ class ActiveRecordToSimpledb
|
|
123
123
|
#
|
124
124
|
# Private: a module with the resque jos
|
125
125
|
#
|
126
|
-
module JobQueue
|
126
|
+
module JobQueue
|
127
127
|
class Create
|
128
128
|
@queue = :active_record_to_simple_db_create
|
129
|
-
def self.perform(
|
130
|
-
|
129
|
+
def self.perform(klass, domain_name, id)
|
130
|
+
|
131
|
+
record = klass.camelize.constantize.find(id)
|
132
|
+
ActiveRecordToSimpledb::Client.create( domain_name , record.attributes)
|
133
|
+
|
131
134
|
end
|
132
135
|
end
|
133
136
|
end
|