iab-ActiveRecordBDBXml 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/Marshaller.rb +12 -0
  2. metadata +1 -1
data/lib/Marshaller.rb CHANGED
@@ -68,6 +68,18 @@ module Marshaller
68
68
  fullName
69
69
  end
70
70
 
71
+ def walk_class_hierarchy(entityName)
72
+ children = []
73
+ associations = eval("#{entityName}.reflect_on_all_associations(:has_one)")
74
+ associations.each do |ass|
75
+ children.push(ass.name.id2name)
76
+ end
77
+ associations = eval("#{entityName}.reflect_on_all_associations(:has_many)")
78
+ associations.each do |ass|
79
+ children.push(ass.name.id2name)
80
+ end
81
+ children
82
+ end
71
83
  def expandRelationships(cardinality,nodeName,params,nvp_format,myagg,info,&block)
72
84
  xml = ""
73
85
  associations = {}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iab-ActiveRecordBDBXml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gary Mawdsley