active_nomad 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/lib/active_nomad/version.rb +1 -1
- data/lib/active_nomad.rb +2 -1
- data/spec/unit/active_nomad_spec.rb +10 -0
- metadata +4 -4
data/CHANGELOG
CHANGED
data/lib/active_nomad/version.rb
CHANGED
data/lib/active_nomad.rb
CHANGED
@@ -83,7 +83,7 @@ module ActiveNomad
|
|
83
83
|
end
|
84
84
|
|
85
85
|
def columns # :nodoc:
|
86
|
-
@columns ||=
|
86
|
+
@columns ||= superclass.columns.dup
|
87
87
|
end
|
88
88
|
|
89
89
|
def reset_column_information # :nodoc:
|
@@ -103,6 +103,7 @@ module ActiveNomad
|
|
103
103
|
end
|
104
104
|
end
|
105
105
|
|
106
|
+
@columns = []
|
106
107
|
self.abstract_class = true
|
107
108
|
|
108
109
|
def create_or_update_without_callbacks
|
@@ -60,6 +60,16 @@ describe ActiveNomad::Base do
|
|
60
60
|
end
|
61
61
|
klass.columns_hash['name'].default.should == 'Joe'
|
62
62
|
end
|
63
|
+
|
64
|
+
it "should add the attribute to those of any superclasses" do
|
65
|
+
superclass = Class.new(ActiveNomad::Base) do
|
66
|
+
attribute :a, :integer
|
67
|
+
end
|
68
|
+
subclass = Class.new(superclass) do
|
69
|
+
attribute :b, :integer
|
70
|
+
end
|
71
|
+
subclass.columns.map{|c| c.name}.should == ['a', 'b']
|
72
|
+
end
|
63
73
|
end
|
64
74
|
|
65
75
|
describe "an integer attribute" do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_nomad
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- George Ogata
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-10-01 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|