bowtie 0.4 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/bowtie.gemspec +1 -1
- data/lib/bowtie/adapters/datamapper.rb +8 -3
- metadata +3 -2
data/bowtie.gemspec
CHANGED
@@ -89,9 +89,14 @@ class Class
|
|
89
89
|
end
|
90
90
|
|
91
91
|
def model_associations
|
92
|
-
|
93
|
-
relationships.
|
94
|
-
|
92
|
+
return [] if relationships.nil? or relationships.empty?
|
93
|
+
if relationships.first.is_a?(Array)
|
94
|
+
return relationships
|
95
|
+
else
|
96
|
+
h = {}
|
97
|
+
relationships.map {|r| h[r.name] = r }
|
98
|
+
return h
|
99
|
+
end
|
95
100
|
end
|
96
101
|
|
97
102
|
def field_names
|
metadata
CHANGED