flame-flash 2.2.0 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/flame/flash.rb +12 -1
- data/lib/flame/flash_array.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: 1575358217da8586e660d5bcf891339c731dee1b
|
4
|
+
data.tar.gz: 9b8e1c0730cfefdcf02c53ecb90fb7ea73613436
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c65c23089751bea42ab1b16779882071cf00a266ff16b50ac709ac6861ceec9329f4c03dffc902102e7bb26f8980aa003ff669883abf255ba574b97a4319b9af
|
7
|
+
data.tar.gz: d9bb3a384aae72a06688161d9ecfde81914f2c53af0b28419380a4bf038d035d821ec1f79d6f30dab1e6f7d92d1a04539d50ebf02c939dceedc8dc79d5114060
|
data/lib/flame/flash.rb
CHANGED
@@ -6,7 +6,7 @@ module Flame
|
|
6
6
|
## After hook
|
7
7
|
def execute(method)
|
8
8
|
super
|
9
|
-
|
9
|
+
record_flashes
|
10
10
|
end
|
11
11
|
|
12
12
|
## Upgrade redirect method
|
@@ -24,6 +24,12 @@ module Flame
|
|
24
24
|
super
|
25
25
|
end
|
26
26
|
|
27
|
+
## Capture halt method
|
28
|
+
def halt(*args)
|
29
|
+
record_flashes
|
30
|
+
super
|
31
|
+
end
|
32
|
+
|
27
33
|
private
|
28
34
|
|
29
35
|
## Main helper method
|
@@ -43,5 +49,10 @@ module Flame
|
|
43
49
|
parameters.include? key
|
44
50
|
end.map(&:to_h)
|
45
51
|
end
|
52
|
+
|
53
|
+
## Move flash.next to session
|
54
|
+
def record_flashes
|
55
|
+
session[:flash] = flash.next
|
56
|
+
end
|
46
57
|
end
|
47
58
|
end
|
data/lib/flame/flash_array.rb
CHANGED
@@ -28,7 +28,7 @@ module Flame
|
|
28
28
|
# We assign to the _next_ hash, but retrieve values
|
29
29
|
# from the _now_ hash. Freaky, huh?
|
30
30
|
def []=(type, text)
|
31
|
-
return text.each { |el| self[type] = el } if text.is_a?
|
31
|
+
return text.each { |el| self[type] = el } if text.is_a?(Array)
|
32
32
|
hash = { type: type, text: text }
|
33
33
|
# p @parent == self, @scope
|
34
34
|
hash[:scope] = @scope if @parent != self
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flame-flash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Popov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: flame
|