model_info 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/model_info/models/display.html.erb +1 -1
- data/lib/model_info/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2dbd3668bcc6e028a41f77ceccf2f52da60171a
|
4
|
+
data.tar.gz: 9ed1d2ee7a4ea283220ec93249799b0c305a80ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 175ad110cdf9a23bbda50aedf89bbddde95fb5b4c1c789da12a048b9aeecf875461df45b423f42d726448b4e8c28987f7096b42d76d6f1a429b8572e23072bbe
|
7
|
+
data.tar.gz: 49636bbc86c348ed735390a0d608a37c2e4501c7a190c2a46cd7e996d33682e0751ed745b2ebf2139d039399dfecb48e18c1c120e19ec87ac01ea292899d269e
|
@@ -24,7 +24,7 @@
|
|
24
24
|
<% @model_class.constantize.reflect_on_all_associations.each do |reflection|%>
|
25
25
|
<% reflection.options[:polymorphic] ? a1.push(reflection.active_record.name) : a2.push(reflection.klass.name) %>
|
26
26
|
<% end %>
|
27
|
-
<% relationship_hash = @model_class.constantize.reflect_on_all_associations.map{|x| [x.name, x.macro]}.zip(a1+a2).
|
27
|
+
<% relationship_hash = @model_class.constantize.reflect_on_all_associations.map{|x| [x.name, x.macro]}.zip(a1+a2).inject({}){|h,e| h[e.first] = e.last; h}%>
|
28
28
|
|
29
29
|
<% if relationship_hash.empty? %>
|
30
30
|
<%= 'Sorry no relationship!'%>
|
data/lib/model_info/version.rb
CHANGED