rails_current 1.2.1 → 1.3.0
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/lib/rails_current.rb +7 -3
- data/rails_current.gemspec +1 -1
- metadata +2 -2
data/lib/rails_current.rb
CHANGED
|
@@ -4,7 +4,7 @@ require 'map'
|
|
|
4
4
|
|
|
5
5
|
module Current
|
|
6
6
|
def Current.version
|
|
7
|
-
'1.
|
|
7
|
+
'1.3.0'
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
def Current.data
|
|
@@ -125,6 +125,7 @@ def Current(*args, &block)
|
|
|
125
125
|
Current.attribute(*args, &block)
|
|
126
126
|
end
|
|
127
127
|
|
|
128
|
+
|
|
128
129
|
if defined?(Rails)
|
|
129
130
|
|
|
130
131
|
module Current
|
|
@@ -133,7 +134,7 @@ if defined?(Rails)
|
|
|
133
134
|
|
|
134
135
|
def Current.install_before_filter!
|
|
135
136
|
::ActionController::Base.module_eval do
|
|
136
|
-
|
|
137
|
+
prepend_before_filter do |controller|
|
|
137
138
|
Current.clear
|
|
138
139
|
Current.controller = controller
|
|
139
140
|
end
|
|
@@ -144,7 +145,9 @@ if defined?(Rails)
|
|
|
144
145
|
if defined?(Rails::Engine)
|
|
145
146
|
class Engine < Rails::Engine
|
|
146
147
|
config.before_initialize do
|
|
147
|
-
|
|
148
|
+
ActiveSupport.on_load(:action_controller) do
|
|
149
|
+
Current.install_before_filter!
|
|
150
|
+
end
|
|
148
151
|
end
|
|
149
152
|
end
|
|
150
153
|
else
|
|
@@ -153,6 +156,7 @@ if defined?(Rails)
|
|
|
153
156
|
|
|
154
157
|
end
|
|
155
158
|
|
|
159
|
+
|
|
156
160
|
::Rails_current = ::Current
|
|
157
161
|
|
|
158
162
|
BEGIN {
|
data/rails_current.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rails_current
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.3.0
|
|
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: 2012-01-
|
|
12
|
+
date: 2012-01-13 00:00:00.000000000 Z
|
|
13
13
|
dependencies: []
|
|
14
14
|
description: ! 'description: rails_current kicks the ass'
|
|
15
15
|
email: ara.t.howard@gmail.com
|