lockdown 0.3.8 → 0.3.9
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +3 -0
- data/lib/lockdown/system.rb +4 -5
- data/lib/lockdown/version.rb +1 -1
- metadata +1 -1
data/History.txt
CHANGED
data/lib/lockdown/system.rb
CHANGED
@@ -180,15 +180,12 @@ module Lockdown
|
|
180
180
|
end
|
181
181
|
|
182
182
|
def fetch_controller_class(str)
|
183
|
-
@controller_classes
|
184
|
-
return klass if klass.name == controller_class_name(str)
|
185
|
-
end
|
183
|
+
@controller_classes[controller_class_name(str)]
|
186
184
|
end
|
187
185
|
|
188
186
|
protected
|
189
187
|
|
190
188
|
def set_defaults
|
191
|
-
@controller_classes = []
|
192
189
|
load_controller_classes
|
193
190
|
|
194
191
|
@permissions = {}
|
@@ -217,6 +214,8 @@ module Lockdown
|
|
217
214
|
end
|
218
215
|
|
219
216
|
def load_controller_classes
|
217
|
+
@controller_classes = {}
|
218
|
+
|
220
219
|
unless const_defined?("Application")
|
221
220
|
require(Lockdown.project_root + "/app/controllers/application.rb")
|
222
221
|
end
|
@@ -226,7 +225,7 @@ module Lockdown
|
|
226
225
|
next if c == "application.rb"
|
227
226
|
klass = controller_class_name_from_file(c)
|
228
227
|
require(c) unless qualified_const_defined?(klass)
|
229
|
-
@controller_classes
|
228
|
+
@controller_classes[klass] = qualified_const_get(klass)
|
230
229
|
end
|
231
230
|
end
|
232
231
|
end
|
data/lib/lockdown/version.rb
CHANGED