dynamic_attributes 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +5 -1
- data/VERSION +1 -1
- data/lib/dynamic_attributes.rb +7 -0
- metadata +13 -4
data/README.rdoc
CHANGED
@@ -28,7 +28,7 @@ dynamic_attributes is a gem that lets you dynamically specify attributes on Acti
|
|
28
28
|
|
29
29
|
== Requirements
|
30
30
|
|
31
|
-
* Rails 2.x / 3
|
31
|
+
* Rails 2.x / 3 (Tested for 2.3.5, 2.3.8 & 3).
|
32
32
|
|
33
33
|
== Installation
|
34
34
|
|
@@ -95,6 +95,10 @@ has_dynamic_attributes :dynamic_attribute_field => :dynamic_attributes, :dynamic
|
|
95
95
|
|
96
96
|
Take a look at the code Rdoc for more information!
|
97
97
|
|
98
|
+
== Validations
|
99
|
+
|
100
|
+
The validations provided by AR can be used for dynamic attributes as if it is a normal attribute.
|
101
|
+
|
98
102
|
== Note on Patches/Pull Requests
|
99
103
|
|
100
104
|
* Fork the project.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.1
|
data/lib/dynamic_attributes.rb
CHANGED
@@ -121,4 +121,11 @@ module DynamicAttributes
|
|
121
121
|
write_attribute(self.dynamic_attribute_field.to_s, (read_attribute(self.dynamic_attribute_field.to_s) || {}).merge(attribute.to_s => value))
|
122
122
|
end
|
123
123
|
|
124
|
+
# Gets the object's singleton class. Backported from Rails 2.3.8 to support older versions of Rails.
|
125
|
+
def singleton_class
|
126
|
+
class << self
|
127
|
+
self
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
124
131
|
end
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynamic_attributes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 17
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 1
|
7
8
|
- 1
|
8
|
-
-
|
9
|
-
version: 1.1.
|
9
|
+
- 1
|
10
|
+
version: 1.1.1
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Reinier de Lange
|
@@ -14,7 +15,7 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2010-09-
|
18
|
+
date: 2010-09-15 00:00:00 +02:00
|
18
19
|
default_executable:
|
19
20
|
dependencies: []
|
20
21
|
|
@@ -38,6 +39,10 @@ files:
|
|
38
39
|
- VERSION
|
39
40
|
- init.rb
|
40
41
|
- lib/dynamic_attributes.rb
|
42
|
+
- test/helper.rb
|
43
|
+
- test/test_dynamic_attributes.rb
|
44
|
+
- test/database.yml
|
45
|
+
- test/schema.rb
|
41
46
|
has_rdoc: true
|
42
47
|
homepage: http://github.com/moiristo/dynamic_attributes
|
43
48
|
licenses: []
|
@@ -48,23 +53,27 @@ rdoc_options:
|
|
48
53
|
require_paths:
|
49
54
|
- lib
|
50
55
|
required_ruby_version: !ruby/object:Gem::Requirement
|
56
|
+
none: false
|
51
57
|
requirements:
|
52
58
|
- - ">="
|
53
59
|
- !ruby/object:Gem::Version
|
60
|
+
hash: 3
|
54
61
|
segments:
|
55
62
|
- 0
|
56
63
|
version: "0"
|
57
64
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
58
66
|
requirements:
|
59
67
|
- - ">="
|
60
68
|
- !ruby/object:Gem::Version
|
69
|
+
hash: 3
|
61
70
|
segments:
|
62
71
|
- 0
|
63
72
|
version: "0"
|
64
73
|
requirements: []
|
65
74
|
|
66
75
|
rubyforge_project:
|
67
|
-
rubygems_version: 1.3.
|
76
|
+
rubygems_version: 1.3.7
|
68
77
|
signing_key:
|
69
78
|
specification_version: 3
|
70
79
|
summary: dynamic_attributes is a gem that lets you dynamically specify attributes on ActiveRecord models, which will be serialized and deserialized to a given text column.
|