sixarm_ruby_current_user_id 1.3.4 → 1.3.8
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.tar.gz.sig +0 -0
- data/CHANGELOG.txt +2 -0
- data/VERSION +1 -1
- data/lib/sixarm_ruby_current_user_id.rb +7 -2
- metadata +2 -2
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.txt
CHANGED
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.3.
|
|
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
|
-
|
|
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.
|
|
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-
|
|
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
|