active_record_schema 0.5.6 → 0.5.7

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.6
1
+ 0.5.7
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "active_record_schema"
8
- s.version = "0.5.6"
8
+ s.version = "0.5.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["mcasimir"]
@@ -6,12 +6,14 @@ module ActiveRecordSchema
6
6
  module ClassMethods
7
7
 
8
8
  def schema
9
- if self.superclass != ActiveRecord::Base
10
- table_holder = self.ancestors.find {|c| c.is_a?(Class) && c.superclass == ActiveRecord::Base}
11
- table_holder.schema
12
- else
13
- @active_record_schema_schema ||= ActiveRecordSchema::Schema.new(self)
14
- end
9
+ # if self.superclass != ActiveRecord::Base
10
+ # table_holder = self.ancestors.find {|c| c.is_a?(Class) && c.superclass == ActiveRecord::Base}
11
+ # table_holder.schema
12
+ # else
13
+ # end
14
+
15
+ @active_record_schema_schema ||= ActiveRecordSchema::Schema.new(self)
16
+
15
17
  end # ~ schema
16
18
 
17
19
  # field :name, :string, :default => "Joe"
@@ -11,7 +11,7 @@ module ActiveRecordSchema
11
11
 
12
12
  def initialize(model)
13
13
  @model = model
14
- @fields = {}
14
+ @fields = ActiveSupport::OrderedHash.new
15
15
  @indexes = {}
16
16
  @joins = {}
17
17
  end
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.6
4
+ version: 0.5.7
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: 1918084152736662712
89
+ hash: -2405613424171215143
90
90
  required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  none: false
92
92
  requirements: