bowtie 0.4 → 0.4.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.
- 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