ddc 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +8 -0
- data/lib/ddc/controller_builder.rb +5 -6
- data/lib/ddc/version.rb +1 -1
- data/spec/controller_builder_spec.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47db88316f12256bf011cba49ba908240c03ae22
|
4
|
+
data.tar.gz: 8be0483b5cb162c19e64e1c9e5961f6def051ecc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd48fbdcba04e2d1d3243c43df3e40db755aad4bd514b314f4a2d57e7d2cfadcbb59cb6345eeb213dd3a1338743b2436007b37d3bba6209392e9a95f1d7748e6
|
7
|
+
data.tar.gz: f3b76c51dc6e8f2f81bdb5f36aae083045fa103bbd7b0045350aa9d46cb9c156a386d1dc666332da98f04279a672918a18e0fdbdd25cbfb906833ca956759901
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -22,11 +22,11 @@ module DDC
|
|
22
22
|
def find_or_create_class(controller_name)
|
23
23
|
controller_klass_name = controller_name.to_s.camelize+'Controller'
|
24
24
|
klass = nil
|
25
|
-
if Object.
|
26
|
-
klass = Object.
|
25
|
+
if Object.qualified_const_defined?(controller_klass_name)
|
26
|
+
klass = Object.qualified_const_get(controller_klass_name)
|
27
27
|
else
|
28
28
|
klass = Class.new(ApplicationController)
|
29
|
-
Object.
|
29
|
+
Object.qualified_const_set(controller_klass_name, klass)
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
@@ -76,14 +76,13 @@ module DDC
|
|
76
76
|
respond_to do |format|
|
77
77
|
format.json do
|
78
78
|
if obj.nil?
|
79
|
-
render_opts = {
|
79
|
+
render_opts = {
|
80
80
|
json: {errors: errors}, status: status }
|
81
81
|
else
|
82
82
|
render_opts = { json: obj, status: status }
|
83
83
|
end
|
84
84
|
|
85
|
-
render_opts
|
86
|
-
render_opts[:each_serializer] = action_desc[:each_serializer] if action_desc.has_key? :each_serializer
|
85
|
+
render_opts = (action_desc[:render_opts]).merge(render_opts) if action_desc.has_key? :render_opts
|
87
86
|
render render_opts
|
88
87
|
end
|
89
88
|
format.html do
|
data/lib/ddc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ddc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shawn Anderson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|