lawrencepit-machinery 0.4 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/machinery/active_record.rb +7 -1
  2. metadata +1 -1
@@ -11,7 +11,13 @@ module Machinery
11
11
  end
12
12
 
13
13
  def self.clear
14
- @@toys.each { |toy| toy.destroy }
14
+ @@toys.each do |toy|
15
+ toy.connection.delete(
16
+ "DELETE FROM #{toy.class.quoted_table_name} " +
17
+ "WHERE #{toy.connection.quote_column_name(toy.class.primary_key)} = #{toy.quoted_id}",
18
+ "#{toy.class.name} Destroy"
19
+ )
20
+ end
15
21
  @@toys = []
16
22
  end
17
23
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lawrencepit-machinery
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.4"
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lawrence Pit