dynamic_models 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/dynamic_models.gemspec +1 -1
- data/lib/dynamic_models.rb +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.1
|
data/dynamic_models.gemspec
CHANGED
data/lib/dynamic_models.rb
CHANGED
@@ -19,7 +19,7 @@ module DynamicModels
|
|
19
19
|
|
20
20
|
# model name from the controller or type parameter (for a model which is using STI)
|
21
21
|
def model_name
|
22
|
-
sti_model? ? params[:type].
|
22
|
+
sti_model? ? params[:type].underscore : params[:controller].split('/').last.singularize
|
23
23
|
end
|
24
24
|
|
25
25
|
# the model class, inferred from the controller
|
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.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -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: -4536995888189918418
|
115
115
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|