kakurenbo 0.2.1 → 0.2.2

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: f8fceaba359613cdffd663005dc7029090c9f381
4
- data.tar.gz: 0d9f9a7cb444c4822c789701dc468df8fbee40b3
3
+ metadata.gz: 788780b9941834c2ade270af22ea73d5d25d2e18
4
+ data.tar.gz: 95a5300b26356040d8dac00be9431da7a6826480
5
5
  SHA512:
6
- metadata.gz: 3d8d53fe4d2766e9e1785cf4d3a4b45b044de1ac47c16091c5efdab73f938c6665279bca49fa93af598b92f9505f3d398777ee7e58026b610e9df05bb57de6e3
7
- data.tar.gz: 3f179d2bbc02c7c94bce01147bf2d928af1e4c3cfa6fbeb9559a923dbf997a226e3e92a361b53c857c3007b6ff354d1ff27488a5d63c946e12dd17bfebbe9059
6
+ metadata.gz: 2be387caf4f5b04a6431e01a6cc62de14dfc884473d255efae57c0fe515ac392f4806ee639011e18d51afef655d544c44c1d015ff1c350e3f3f13ca2f5a3f03a
7
+ data.tar.gz: bb6a270e83ce04f00b83056d7fdd4b8381773000eaa01d91c9674cefeb757ec4ec6ea35739b3ef744c24eb2484b91d5ca308d1ca075878d886e0a225d4e98f62
@@ -23,6 +23,9 @@ module Kakurenbo
23
23
 
24
24
  child_class.instance_eval do
25
25
  remodel_as_soft_delete if has_kakurenbo_column?
26
+
27
+ # Reset @table name, because ActiveRecord doesn't expect initialized at here.
28
+ remove_instance_variable(:@table_name)
26
29
  end
27
30
  end
28
31
 
@@ -1,3 +1,3 @@
1
1
  module Kakurenbo
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
@@ -90,4 +90,23 @@ describe Kakurenbo::MixinARBase do
90
90
  end
91
91
  end
92
92
  end
93
+
94
+
95
+ describe 'abstract_class' do
96
+ before :all do
97
+ class Parent < ActiveRecord::Base
98
+ self.abstract_class = true
99
+ end
100
+ class Child < Parent; end
101
+ end
102
+
103
+ after :all do
104
+ Object.send(:remove_const, :Parent)
105
+ Object.send(:remove_const, :Child)
106
+ end
107
+
108
+ it '.table_name of Child return `children`' do
109
+ expect(Child.table_name).to eq('children')
110
+ end
111
+ end
93
112
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kakurenbo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - alfa-jpn
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-27 00:00:00.000000000 Z
11
+ date: 2014-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler