rein 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,7 +27,7 @@ module RC
27
27
 
28
28
  name = options[:name] || "#{referencing_attribute}_fk".to_sym
29
29
 
30
- if self.class.is_a?(ActiveRecord::ConnectionAdapters::MysqlAdapter)
30
+ if is_a_mysql_adapter?
31
31
  execute "ALTER TABLE #{referencing_table} DROP FOREIGN KEY #{name}"
32
32
  else
33
33
  execute "ALTER TABLE #{referencing_table} DROP CONSTRAINT #{name}"
@@ -53,5 +53,9 @@ module RC
53
53
  raise "Unknown referential action '#{action}'"
54
54
  end
55
55
  end
56
+
57
+ def is_a_mysql_adapter?
58
+ self.class.to_s =~ /Mysql[2]?Adapter/
59
+ end
56
60
  end
57
61
  end
data/lib/rein/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rein
2
- VERSION = "0.7.0" unless defined?(Rein::VERSION)
2
+ VERSION = "0.7.1" unless defined?(Rein::VERSION)
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 7
8
- - 0
9
- version: 0.7.0
8
+ - 1
9
+ version: 0.7.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Josh Bassett
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-10-28 00:00:00 +11:00
17
+ date: 2011-02-01 00:00:00 +11:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency