brianjlandau-foreigner 0.7.1 → 0.7.2

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.1
1
+ 0.7.2
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{brianjlandau-foreigner}
8
- s.version = "0.7.1"
8
+ s.version = "0.7.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Matthew Higgins", "Brian Landau"]
@@ -6,7 +6,7 @@ module Foreigner
6
6
  end
7
7
 
8
8
  def add_foreign_key(from_table, to_table, options = {})
9
- column = options[:column] || "#{to_table.to_s.singularize}_id"
9
+ column = options[:column] || "#{to_table.to_s.gsub(/^\w+\./, '').singularize}_id"
10
10
  foreign_key_name = foreign_key_name(from_table, column, options)
11
11
  primary_key = options[:primary_key] || "id"
12
12
  dependency = dependency_sql(options[:dependent])
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brianjlandau-foreigner
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 7
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 1
10
- version: 0.7.1
9
+ - 2
10
+ version: 0.7.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matthew Higgins