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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a02bf176fb80148daba59bb10f1e79b2a4e72b34
4
- data.tar.gz: 10b52ffc976f2a11dad96c8af566cbcc53348b02
3
+ metadata.gz: 0fce6a510f7ff8066533824f62bef12ac1609b76
4
+ data.tar.gz: 5b3edaed24b097e7197726476f206a335565c64f
5
5
  SHA512:
6
- metadata.gz: daa0219436c7fdb69fdc6ac00c5ba7841f9aa3fb9e87fa1733be4748a2d4a134aa975cfae75ce7dfdc2781ba96cbc3b3cdaf4f68608a6d04d150a7839694fcaf
7
- data.tar.gz: 9e84204b39d959d05f19d483f85fcc2c986fca340ec7573a2ba6f3f42925e78ddde89f31b4aae67995d5bc8a22e2971b0f062d0e503cc6ee45a7046a99c6ad8b
6
+ metadata.gz: c1ce80cc373643d251e2819985298c5e905b21663c89d3b36f5bd62186e86911fc12153de71a7093aad76335e7c21eaee2de55f8ec366e5663ae26a31ece27c9
7
+ data.tar.gz: 7915485e10b704e9bf0efabd82b75b81d201900446dda58eb3e4ac587be1660918acdded1848bc1b98ca2a1053a0af2ae2c3255436b0505187e3ecd185ec3d03
@@ -1,3 +1,7 @@
1
+ ## 2016-11-17 3.3.1
2
+
3
+ * Added `:success` and `:warning` to list of Flash keys visible by default
4
+
1
5
  ## 2016-11-08 3.3.0
2
6
 
3
7
  * Now compatible with jQuery 1, 2 and 3.
@@ -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 other than `notice, alert, error`
99
+ ## Using custom flash keys
100
100
 
101
- By default, Unobtrusive Flash only displays the three "default" Rails flash types: `notice`, `alert`, and `error`. 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:
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- unobtrusive_flash (3.2.0)
4
+ unobtrusive_flash (3.3.1)
5
5
  railties
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- unobtrusive_flash (3.2.0)
4
+ unobtrusive_flash (3.3.1)
5
5
  railties
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- unobtrusive_flash (3.2.0)
4
+ unobtrusive_flash (3.3.1)
5
5
  railties
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- unobtrusive_flash (3.2.0)
4
+ unobtrusive_flash (3.3.1)
5
5
  railties
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- unobtrusive_flash (3.2.0)
4
+ unobtrusive_flash (3.3.1)
5
5
  railties
6
6
 
7
7
  GEM
@@ -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
@@ -1,3 +1,3 @@
1
1
  module UnobtrusiveFlash
2
- VERSION = "3.3.0"
2
+ VERSION = "3.3.1"
3
3
  end
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.0
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-08 00:00:00.000000000 Z
11
+ date: 2016-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties