has_inherited 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/has_inherited.gemspec +2 -2
- data/lib/has_inherited.rb +2 -3
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.
|
1
|
+
2.0.1
|
data/has_inherited.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{has_inherited}
|
8
|
-
s.version = "2.0.
|
8
|
+
s.version = "2.0.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Mark Turner", "Steve Burkett"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-07-01}
|
13
13
|
s.description = %q{The intention of this library is to make it easy to inherit particular variables between models in rails apps. We start with a parent model that will function as a pseudo-polymorphic association for children objects.}
|
14
14
|
s.email = %q{mark@amerine.net}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/has_inherited.rb
CHANGED
@@ -7,7 +7,7 @@ module HasInherited
|
|
7
7
|
def is_inheritable(*name)
|
8
8
|
attr = name.shift || :global
|
9
9
|
assoc = "_#{attr}"
|
10
|
-
|
10
|
+
|
11
11
|
scope assoc.to_sym,
|
12
12
|
:conditions => 'inheritable_id IS NULL AND inheritable_type IS NULL'
|
13
13
|
|
@@ -36,8 +36,7 @@ module HasInherited
|
|
36
36
|
end # ClassMethods
|
37
37
|
|
38
38
|
class InheritAccessor
|
39
|
-
|
40
|
-
instance_methods.each {|m| undef_method m unless m.to_s =~ /(^__|send|inject)/}
|
39
|
+
instance_methods.each {|m| undef_method m unless m.to_s =~ /(^__|send|inject|object_id)/}
|
41
40
|
|
42
41
|
def initialize(owner, assoc, heritage)
|
43
42
|
@owner = owner
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: has_inherited
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 2.0.
|
9
|
+
- 1
|
10
|
+
version: 2.0.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Mark Turner
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-
|
19
|
+
date: 2011-07-01 00:00:00 -07:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|