active_record_schema 0.5.8 → 0.5.9
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/active_record_schema.gemspec +1 -1
- data/lib/active_record_schema/schema.rb +6 -2
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.9
|
@@ -21,11 +21,15 @@ module ActiveRecordSchema
|
|
21
21
|
@hierarchy_fields
|
22
22
|
else
|
23
23
|
@hierarchy_fields ||= ActiveSupport::OrderedHash.new
|
24
|
-
|
24
|
+
model.ancestors.select { |c| c < ActiveRecord::Base }.reverse_each do |klass|
|
25
25
|
@hierarchy_fields = @hierarchy_fields.merge(klass.fields)
|
26
26
|
end
|
27
27
|
end
|
28
|
-
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def hierarchy_fields_names
|
31
|
+
hierarchy_fields.values.map(&:name).map(&:to_s)
|
32
|
+
end
|
29
33
|
|
30
34
|
def field_names
|
31
35
|
fields.values.map(&:name).map(&:to_s)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_record_schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -86,7 +86,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
86
86
|
version: '0'
|
87
87
|
segments:
|
88
88
|
- 0
|
89
|
-
hash:
|
89
|
+
hash: 1976954515079446063
|
90
90
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
91
91
|
none: false
|
92
92
|
requirements:
|