dynamic_error_pages 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 45a97320da48fe28a0802c9d68327d321009ccb5
|
|
4
|
+
data.tar.gz: 4d25552cdd814ebb289413f9f5c4adb553c4417d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 024aeadca90cf9e1c34c661645c1f47ef569e9977b3fe98b83e464458beaad6d0801c6d6cca9b6c3ff6422ab285306e73f2bb43762aa78e554d4208980088e09
|
|
7
|
+
data.tar.gz: d4e95d95cd8a6473fae1df2a48b923e1dca04fc8cd03412e464c81b1d667a9499b19faa7eb0930e0b9f5d9e402ee70b7fed84ed8bc84807c7375dbb6798371bc
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
class DynamicErrorPages::ErrorsController < ApplicationController
|
|
2
2
|
|
|
3
3
|
def show
|
|
4
|
+
request.format = :html
|
|
4
5
|
begin
|
|
5
6
|
render "#{status_code}", :status => status_code, :formats => [:html]
|
|
6
7
|
rescue ActionView::MissingTemplate => e
|
|
@@ -19,8 +20,4 @@ class DynamicErrorPages::ErrorsController < ApplicationController
|
|
|
19
20
|
request.path[1..-1]
|
|
20
21
|
end
|
|
21
22
|
|
|
22
|
-
def exception
|
|
23
|
-
env['action_dispatch.exception']
|
|
24
|
-
end
|
|
25
|
-
|
|
26
23
|
end
|
data/config/routes.rb
CHANGED
|
@@ -3,5 +3,8 @@ Rails.application.routes.draw do
|
|
|
3
3
|
# rails 4 need the :via option
|
|
4
4
|
via = Rails::VERSION::MAJOR > 3 ? {:via => :all} : {}
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
# if a subclassed errorscontroller exist, route to it
|
|
7
|
+
controller = defined?(DynamicErrorPages::PatchedErrorsController) ? 'patched_errors' : 'errors'
|
|
8
|
+
|
|
9
|
+
match '/:status', {:to => "dynamic_error_pages/#{controller}#show", :constraints => { :status => /\d{3}/ }}.merge(via)
|
|
7
10
|
end
|
data/gemfiles/3.2.gemfile.lock
CHANGED
data/gemfiles/4.0.gemfile.lock
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dynamic_error_pages
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Marcus Geißler
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-10-
|
|
11
|
+
date: 2013-10-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|