tableless_model 0.0.9 → 0.1.0
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.
|
@@ -4,9 +4,11 @@ class ActiveRecord::Base
|
|
|
4
4
|
# delegates method calls for unknown methods to the tableless model
|
|
5
5
|
#
|
|
6
6
|
def method_missing method, *args, &block
|
|
7
|
-
self.class.tableless_models
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
if self.class.tableless_models
|
|
8
|
+
self.class.tableless_models.each do |column_name|
|
|
9
|
+
serialized_attribute = send(column_name)
|
|
10
|
+
return serialized_attribute.send(method, *args, &block) if serialized_attribute.respond_to?(method)
|
|
11
|
+
end
|
|
10
12
|
end
|
|
11
13
|
|
|
12
14
|
super method, *args, &block
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tableless_model
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 27
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
|
+
- 1
|
|
8
9
|
- 0
|
|
9
|
-
|
|
10
|
-
version: 0.0.9
|
|
10
|
+
version: 0.1.0
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Vito Botta
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2011-07-
|
|
18
|
+
date: 2011-07-27 00:00:00 +01:00
|
|
19
19
|
default_executable:
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|