restful_json 4.5.0 → 4.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/restful_json/controller.rb +2 -2
- data/lib/restful_json/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1be8aa95b33fcefee60c4de7f02e37926388f14
|
4
|
+
data.tar.gz: dd605041aedbc7e11eb2214b48416291bb9ad646
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24c66cf4e68cbcc463a8912ec2da17fdd263272f95948aa494c2b624790b21423f58c14dcb7b07499844c864aa340eefcaa59826e07f4356fb4e726a36e08bef
|
7
|
+
data.tar.gz: 9bc9bbb2861f2e4b7832843bccac35b6f62f6a79463a6c8d103da904b85042faa277fc13f8d6d48025bb795e7bb6c67a6f1a279a2502ad79315d98e5bf49f580
|
data/README.md
CHANGED
@@ -270,7 +270,7 @@ module RestfulJson
|
|
270
270
|
# this is something we intended to rescue, so log it
|
271
271
|
logger.error(e)
|
272
272
|
# render error only if we haven't rendered response yet
|
273
|
-
|
273
|
+
render_rj_action_error(e, handling_data) unless @performed_render
|
274
274
|
end
|
275
275
|
|
276
276
|
def do_find_model_instance(first_method)
|
@@ -354,7 +354,7 @@ module RestfulJson
|
|
354
354
|
# {"status": "not_found", "error", "Couldn't find Bar with id=23423423"}
|
355
355
|
#
|
356
356
|
# It handles any format in theory that is supported by respond_to and has a `to_(some format)` method.
|
357
|
-
def
|
357
|
+
def render_rj_action_error(e, handling_data)
|
358
358
|
use_backtrace_cleaner = handling_data[:clean_backtrace] || true
|
359
359
|
i18n_key = handling_data[:i18n_key]
|
360
360
|
msg = t(i18n_key, default: e.message)
|
data/lib/restful_json/version.rb
CHANGED