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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d801cc9e31c5a58d81eb4b61877e5f1afe6209a8
4
- data.tar.gz: d783b3f24d7bba3bc5cc58dcb6c6ad7b024941df
3
+ metadata.gz: e2dbd3668bcc6e028a41f77ceccf2f52da60171a
4
+ data.tar.gz: 9ed1d2ee7a4ea283220ec93249799b0c305a80ef
5
5
  SHA512:
6
- metadata.gz: 07d3fcf3dc48b534d76cf915441684c4d2dead8e8725ff4e16c0a26226f3321f52e1b09e46e7d638c3edd4768555729e316d2c911cdfa6b579c7aaee8f8e9d35
7
- data.tar.gz: 20695644e9842dd6f8b4f6bbce2121ce22cee47230a1ceacaf8da47b45d134e0b4befacba687210d75c3d363b48410e770ed9a3d3a1d4613e0c0d952df1b6f45
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).to_h %>
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!'%>
@@ -1,3 +1,3 @@
1
1
  module ModelInfo
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: model_info
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - nitanshu verma