glib-web 0.4.64 → 0.4.65

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 858f6fed00fa49aec1cf76be385cca527a974886
4
- data.tar.gz: 68dede69174f1fd1f1e446163b29381fae940e31
3
+ metadata.gz: 2158feb2985dca0cb028b034fbd8b9d9ba94924b
4
+ data.tar.gz: 5319d4abaa9541211a111ed57c1d505e7a50e154
5
5
  SHA512:
6
- metadata.gz: 17af41de6d205e5d29e6f8c824d0528537f23bc50a4620eab2f0230133a1abeacfca4a7fcc7a62cc701dae2fabce43fb96d818482e59283bf1c382e1e19b641f
7
- data.tar.gz: 7a403d20f8dd93dcca61ecfbbf148882c1d6030f30bcb65f2e1442c522c8e190e29b6054841b1c1c7b90b4db8c4b3220b63d3e207021df900f6d755ac695d32f
6
+ metadata.gz: 472b176e7a2e6bacb8d3f0e8c562df8e7ac339618f544f4685344d2a2efd04fad2ccdd42735ad134223d447b90fd4dbb89ce4b1dfa31e7780e904149634801ef
7
+ data.tar.gz: 921148bf350fa27bbd43a8b13770551af7cf872c3fe49944e7f9e2a4b14a51aa16688c1755b2490f707ee69a9a4140a9e13505717a04af4825a08806cae7daab
@@ -46,6 +46,14 @@ module Glib::Json::Libs
46
46
  end
47
47
  end
48
48
 
49
+ def json_libs_handle_404
50
+ if json_ui_activated?
51
+ render file: "#{Rails.root}/public/404.html", status: :not_found
52
+ else
53
+ raise exception
54
+ end
55
+ end
56
+
49
57
 
50
58
 
51
59
  module ClassMethods
@@ -103,5 +111,11 @@ module Glib::Json::Libs
103
111
  end
104
112
  end
105
113
 
114
+ def json_libs_rescue_404
115
+ rescue_from ActiveRecord::RecordNotFound do |exception|
116
+ json_libs_handle_404
117
+ end
118
+ end
119
+
106
120
  end
107
121
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glib-web
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.64
4
+ version: 0.4.65
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''