dynamic_models 0.4.7 → 0.4.8
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.
- data/VERSION +1 -1
- data/dynamic_models.gemspec +2 -2
- data/lib/dynamic_models.rb +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.8
|
data/dynamic_models.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "dynamic_models"
|
8
|
-
s.version = "0.4.
|
8
|
+
s.version = "0.4.8"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Craig Ulliott"]
|
12
|
-
s.date = "2012-10-
|
12
|
+
s.date = "2012-10-20"
|
13
13
|
s.description = "Methods to get and build models directly from parameters. Useful for DRYing up code, specifically very dynamic code for things like admin tools."
|
14
14
|
s.email = "craigulliott@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/dynamic_models.rb
CHANGED
@@ -50,7 +50,7 @@ module DynamicModels
|
|
50
50
|
new_model = model_class.new(defaults)
|
51
51
|
# if there is a parent then associate it with the model
|
52
52
|
if parent_model
|
53
|
-
new_model.send("#{parent_model.class.name.
|
53
|
+
new_model.send("#{parent_model.class.name.underscore}=", parent_model)
|
54
54
|
end
|
55
55
|
# return the new model
|
56
56
|
new_model
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynamic_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: shoulda
|
@@ -111,7 +111,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
111
111
|
version: '0'
|
112
112
|
segments:
|
113
113
|
- 0
|
114
|
-
hash:
|
114
|
+
hash: -2633725406399149360
|
115
115
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|