sixarm_ruby_current_user_id 1.3.4 → 1.3.8

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
data/CHANGELOG.txt CHANGED
@@ -1,4 +1,6 @@
1
1
  CHANGELOG
2
2
 
3
+ 2011-04-25 1.3.8 Add memoize and :reload => true
4
+ 2011-04-22 1.3.4 Add self to protect from local variable masking
3
5
  2011-04-19 1.3.2 Bump to match sixarm_ruby_current_user gem
4
6
  2011-04-18 1.3.0 Public release of version for Ruby 1.9.2 and Rails 3.0.5
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.4
1
+ 1.3.8
@@ -7,10 +7,15 @@ module CurrentUserId
7
7
 
8
8
 
9
9
  # Get the current user id in the Rails session array.
10
+ #
11
+ # The current user id is memoized as @current_user_id.
12
+ # To reload, pass :reload => true
13
+ #
10
14
  # Return the session's current user id.
11
15
 
12
- def current_user_id
13
- return session[:current_user_id]
16
+ def current_user_id(ops={})
17
+ if ops[:reload] then @current_user_id=nil end
18
+ @current_user_id ||= session[:current_user_id]
14
19
  end
15
20
 
16
21
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: sixarm_ruby_current_user_id
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.3.4
5
+ version: 1.3.8
6
6
  platform: ruby
7
7
  authors:
8
8
  - SixArm
@@ -30,7 +30,7 @@ cert_chain:
30
30
  eabwpCbAopo=
31
31
  -----END CERTIFICATE-----
32
32
 
33
- date: 2011-04-22 00:00:00 -07:00
33
+ date: 2011-04-25 00:00:00 -07:00
34
34
  default_executable:
35
35
  dependencies: []
36
36
 
metadata.gz.sig CHANGED
Binary file