slimmer 16.0.1 → 17.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +4 -0
- data/lib/slimmer/skin.rb +1 -1
- data/lib/slimmer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a6d7eb900be169022598a1a09b96d08394d90e55ca451e611bc9de803f900f0
|
4
|
+
data.tar.gz: 71243a607e6868ae847544cc1ed6d30acdf031f41b0572ac309fccf93e2814db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d986e7ec508d57b6d949272db05a0a5b25184ffe9195760671d1e72dc5f6397857ae0f5dc35936749ca0eb1cb7880e750a72f36a83d5dddc9792eada2349694
|
7
|
+
data.tar.gz: 50f88ad62bb6530f70a8684f7427ce9933525440fbc131669526fc65ebdd8502c7d1e247771a54989842d77be31230b1e60b7f0692b3b5e91fa5767dbff5f73b
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -57,6 +57,10 @@ class ApplicationController < ActionController::Base
|
|
57
57
|
end
|
58
58
|
```
|
59
59
|
|
60
|
+
## Use in before_action renders
|
61
|
+
|
62
|
+
If you have a non-default layout and want to render in a before_action method, note that you may have to explicitly call `slimmer_template(:your_template_name)` in the action before rendering. Rendering in a before_action immediately stops the action chain, and since slimmer usually calls slimmer_template as an after_action, it would be skipped over (and you'd get the default layout).
|
63
|
+
|
60
64
|
## Logging
|
61
65
|
|
62
66
|
Slimmer can be configured with a logger by passing in a logger instance
|
data/lib/slimmer/skin.rb
CHANGED
@@ -119,7 +119,7 @@ module Slimmer
|
|
119
119
|
Processors::AccountsShower.new(response.headers),
|
120
120
|
]
|
121
121
|
|
122
|
-
template_name = response.headers[Headers::TEMPLATE_HEADER] || "
|
122
|
+
template_name = response.headers[Headers::TEMPLATE_HEADER] || "gem_layout"
|
123
123
|
process(processors, body, template(template_name), source_request.env)
|
124
124
|
end
|
125
125
|
end
|
data/lib/slimmer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slimmer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 17.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|