gbdev-pretty_flash 0.1.3 → 0.1.4
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.
- data/lib/pretty_flash/pretty_flash.rb +16 -0
- metadata +4 -2
@@ -1,5 +1,21 @@
|
|
1
1
|
module PrettyFlash
|
2
2
|
module ControllerMethods
|
3
|
+
|
4
|
+
def flash_has_successes?
|
5
|
+
!flash[:success].nil?
|
6
|
+
end
|
7
|
+
|
8
|
+
def flash_has_notices?
|
9
|
+
!flash[:notice].nil?
|
10
|
+
end
|
11
|
+
|
12
|
+
def flash_has_warnings?
|
13
|
+
!flash[:warning].nil?
|
14
|
+
end
|
15
|
+
|
16
|
+
def flash_has_errors?
|
17
|
+
!flash[:error].nil?
|
18
|
+
end
|
3
19
|
|
4
20
|
# clear all flash if you need to ensure it is empty. This shouldn't
|
5
21
|
# normally be needed if you are properly using flash and flash.now
|
metadata
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gbdev-pretty_flash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Heath
|
8
8
|
- John Dell
|
9
|
+
- Wes Hays
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
13
|
|
13
|
-
date: 2009-
|
14
|
+
date: 2009-02-05 00:00:00 -08:00
|
14
15
|
default_executable:
|
15
16
|
dependencies: []
|
16
17
|
|
@@ -18,6 +19,7 @@ description: A Rails plugin/gem that provides css friendly success/notice/warnin
|
|
18
19
|
email:
|
19
20
|
- rpheath@gmail.com
|
20
21
|
- spovich@gmail.com
|
22
|
+
- weshays@gbdev.com
|
21
23
|
executables: []
|
22
24
|
|
23
25
|
extensions: []
|