unobtrusive_flash 3.3.0 → 3.3.1
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.markdown +2 -2
- data/gemfiles/rails_3.2.gemfile.lock +1 -1
- data/gemfiles/rails_4.0.gemfile.lock +1 -1
- data/gemfiles/rails_4.1.gemfile.lock +1 -1
- data/gemfiles/rails_4.2.gemfile.lock +1 -1
- data/gemfiles/rails_5.gemfile.lock +1 -1
- data/lib/unobtrusive_flash/controller_mixin.rb +1 -1
- data/lib/unobtrusive_flash/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0fce6a510f7ff8066533824f62bef12ac1609b76
|
4
|
+
data.tar.gz: 5b3edaed24b097e7197726476f206a335565c64f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1ce80cc373643d251e2819985298c5e905b21663c89d3b36f5bd62186e86911fc12153de71a7093aad76335e7c21eaee2de55f8ec366e5663ae26a31ece27c9
|
7
|
+
data.tar.gz: 7915485e10b704e9bf0efabd82b75b81d201900446dda58eb3e4ac587be1660918acdded1848bc1b98ca2a1053a0af2ae2c3255436b0505187e3ecd185ec3d03
|
data/CHANGELOG.md
CHANGED
data/README.markdown
CHANGED
@@ -96,9 +96,9 @@ UnobtrusiveFlash.showFlashMessage('Hello World', {type: 'notice'})
|
|
96
96
|
UnobtrusiveFlash.showFlashMessage('Error', {type: 'error', timeout: 0})
|
97
97
|
```
|
98
98
|
|
99
|
-
## Using flash keys
|
99
|
+
## Using custom flash keys
|
100
100
|
|
101
|
-
By default, Unobtrusive Flash only displays
|
101
|
+
By default, Unobtrusive Flash only displays a limited set of flash types [(see UnobtrusiveFlash::ControllerMixin#unobtrusive_flash_keys)](https://github.com/leonid-shevtsov/unobtrusive_flash/blob/master/lib/unobtrusive_flash/controller_mixin.rb#L36). This is because some libraries use `flash` to keep data that is not directed at the user; for example, [Devise](https://github.com/plataformatec/devise) uses a boolean `flash[:timedout]`. If you use other keys to store messages, override `unobtrusive_flash_keys` in your controller:
|
102
102
|
|
103
103
|
```ruby
|
104
104
|
class ApplicationController
|
@@ -34,7 +34,7 @@ module UnobtrusiveFlash
|
|
34
34
|
# List of all flash keys that will be displayed on the frontend. Override
|
35
35
|
# this method if you use more flash types.
|
36
36
|
def unobtrusive_flash_keys
|
37
|
-
[:notice, :alert, :error]
|
37
|
+
[:notice, :alert, :error, :success, :warning]
|
38
38
|
end
|
39
39
|
|
40
40
|
class << self
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unobtrusive_flash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leonid Shevtsov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|