mikeycgto-sinatra-rest 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sinatra/rest/rest.yaml +2 -2
- metadata +2 -2
data/lib/sinatra/rest/rest.yaml
CHANGED
@@ -27,7 +27,7 @@
|
|
27
27
|
@SINGULAR = call_model_method(MODEL, :new, mp)
|
28
28
|
@SINGULAR.save
|
29
29
|
:render: |-
|
30
|
-
|
30
|
+
if @SINGULAR.errors.empty?
|
31
31
|
redirect url_for_PLURAL_show(@SINGULAR), 'SINGULAR created'
|
32
32
|
else
|
33
33
|
if request.xhr?
|
@@ -72,7 +72,7 @@
|
|
72
72
|
if @SINGULAR.nil?
|
73
73
|
throw :halt, [404, 'SINGULAR not found']
|
74
74
|
else
|
75
|
-
|
75
|
+
if @SINGULAR.errors.empty?
|
76
76
|
redirect url_for_PLURAL_show(@SINGULAR), 'SINGULAR updated'
|
77
77
|
else
|
78
78
|
if request.xhr?
|