flashee 0.3.0 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/flashee/version.rb +1 -1
- data/lib/templates/flashee_helper.rb +21 -11
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db739791f4f0f26df44f738fd357b6a5c51fe468d324b1a8ada0ac56c3b5067e
|
4
|
+
data.tar.gz: 2e6e89df16f95ac6a16c7356aa3d23561d96c5d7e3bf7b9d34f7ab82e6032dd2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fe1852624da34dac2483cb790ba6c6f4cc4145d35fd7fdad828c5fb15434560cab4f9edac9c0a58d1d0e641a12200ee679597b90b2bed5b2dbbc692a3538bfd
|
7
|
+
data.tar.gz: 23053ef42fba5034e8a6fc2cc0b2e9ad00b7ef0edbe84f53a6b0314ab1fcd252dd4ef1c665686296ecdbaaa11563d243f9c0b83345fa64c3d2a7a1368785917e
|
data/README.md
CHANGED
data/lib/flashee/version.rb
CHANGED
@@ -1,14 +1,24 @@
|
|
1
1
|
module FlasheeHelper
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
2
|
+
# Called by the `_flash_messages.html.erb` partial to drop-in the css class
|
3
|
+
# that matches the value of `:type` on the flash message.
|
4
|
+
#
|
5
|
+
# == Parameters:
|
6
|
+
# flash_type::
|
7
|
+
# A symbol or string that is passed from the flash messages `type` attribute
|
8
|
+
#
|
9
|
+
# == Returns:
|
10
|
+
# A string for the css class
|
11
|
+
#
|
12
|
+
def flashee_for flash_type
|
13
|
+
case flash_type.to_s
|
14
|
+
when "success"
|
15
|
+
"success"
|
16
|
+
when "error"
|
17
|
+
"error"
|
18
|
+
when "alert"
|
19
|
+
"alert"
|
20
|
+
else
|
21
|
+
flash_type.to_s
|
13
22
|
end
|
23
|
+
end
|
14
24
|
end
|