flash_hash_request_uuid 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Flash with Request UUID
2
2
 
3
- This gem hijacks the `flash[:blah]` calls in your application and instead of storing just the string message
3
+ This gem hijacks the `flash[:error]` calls in your application and instead of storing just the string message
4
4
  you send it, it stores a hash that includes your message and the request UUID.
5
5
 
6
6
  Example:
@@ -3,7 +3,11 @@ module FlashHashRequestUuid
3
3
  attr_accessor :request_uuid
4
4
 
5
5
  def []=(k, v)
6
- super k, { :message => v, :request_uuid => request_uuid }
6
+ if k.to_s == 'error'
7
+ v = { :message => v, :request_uuid => request_uuid }
8
+ end
9
+
10
+ super k, v
7
11
  end
8
12
  end
9
13
  end
@@ -1,3 +1,3 @@
1
1
  module FlashHashRequestUuid
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flash_hash_request_uuid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-08 00:00:00.000000000 Z
12
+ date: 2013-01-09 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: ! 'Overrides setting flash messages to automatically wrap them in a hash.
15
15
  The original message is stored in the :message key and the request UUID is stored