shield 0.0.1 → 0.0.2

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.
Files changed (3) hide show
  1. data/lib/shield.rb +1 -1
  2. data/lib/shield/helpers.rb +1 -1
  3. metadata +3 -3
@@ -1,5 +1,5 @@
1
1
  module Shield
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
 
4
4
  autoload :Password, "shield/password"
5
5
  autoload :Helpers, "shield/helpers"
@@ -9,7 +9,7 @@ module Shield
9
9
 
10
10
  def authenticated(model)
11
11
  @_authenticated ||= {}
12
- @_authenticated[model] ||= model[session[model.to_s]]
12
+ @_authenticated[model] ||= session[model.to_s] && model[session[model.to_s]]
13
13
  end
14
14
 
15
15
  def redirect_to_login
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 1
9
- version: 0.0.1
8
+ - 2
9
+ version: 0.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Michel Martens
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-10-21 00:00:00 +08:00
19
+ date: 2010-12-19 00:00:00 +08:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency