zuul 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zuul/active_record/scope.rb +7 -1
- data/lib/zuul/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b98d35feba741249f26d2700e815d15f0f87c969
|
4
|
+
data.tar.gz: ea24b63238871dfd1ea1f2382dc9d1df48a97449
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dea4199f801fa7a2463af0872d4b2367c5bd4491ff2b379b7127f785b58b2c1844c966d1d1e52520c3b7f626a6e1bf56b51f61ccbd013187086057ae53d1be18
|
7
|
+
data.tar.gz: 60b3ef6d9d0b7444af7f6cae06401e280904d77c38cd7683476713ad370b0e619afc57d164645997aadb9810da0f1be289c485ad54a142db545480d65504a779
|
@@ -70,7 +70,13 @@ module Zuul
|
|
70
70
|
class_eval do
|
71
71
|
# def CLASS_TYPE_foreign_key
|
72
72
|
define_method "#{class_type_name}_foreign_key" do
|
73
|
-
|
73
|
+
# This is hideous, but we need some sort of fallback for cases like Rails 4 Heroku deploys where the environment and
|
74
|
+
# database are not available.
|
75
|
+
begin
|
76
|
+
"#{send("#{class_type_name}_table_name").singularize}_#{send("#{class_type_name}_class").primary_key}"
|
77
|
+
rescue
|
78
|
+
"#{send("#{class_type_name}_table_name").singularize}_id"
|
79
|
+
end
|
74
80
|
end
|
75
81
|
alias_method "#{class_type.to_s.gsub(/_class$/,"").pluralize}_foreign_key", "#{class_type.to_s.gsub(/_class$/,"").singularize}_foreign_key"
|
76
82
|
|
data/lib/zuul/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zuul
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Rebec
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-06-
|
11
|
+
date: 2013-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|