tableless_model 0.0.9 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -73,6 +73,7 @@ module Base
73
73
  v = encryption_key ? ActiveSupport::MessageEncryptor.new(encryption_key).encrypt(YAML::dump(v)) : v
74
74
  super v
75
75
  end
76
+
76
77
  end
77
78
  end
78
79
 
@@ -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.each do |column_name|
8
- serialized_attribute = send(column_name)
9
- return serialized_attribute.send(method, *args, &block) if serialized_attribute.respond_to?(method)
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
@@ -1,3 +1,3 @@
1
1
  module TablelessModel
2
- VERSION = "0.0.9"
2
+ VERSION = "0.1.0"
3
3
  end
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: 13
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
+ - 1
8
9
  - 0
9
- - 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-26 00:00:00 +01:00
18
+ date: 2011-07-27 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency