aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/filters.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/filters.rb')
-rw-r--r--actionpack/lib/action_controller/filters.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/filters.rb b/actionpack/lib/action_controller/filters.rb
index 0a6a648885..2b260b80d7 100644
--- a/actionpack/lib/action_controller/filters.rb
+++ b/actionpack/lib/action_controller/filters.rb
@@ -283,22 +283,22 @@ module ActionController #:nodoc:
# Returns all the before filters for this class and all its ancestors.
def before_filters #:nodoc:
- read_inheritable_attribute("before_filters") || []
+ @before_filters ||= read_inheritable_attribute("before_filters") || []
end
# Returns all the after filters for this class and all its ancestors.
def after_filters #:nodoc:
- read_inheritable_attribute("after_filters") || []
+ @after_filters ||= read_inheritable_attribute("after_filters") || []
end
# Returns a mapping between filters and the actions that may run them.
def included_actions #:nodoc:
- read_inheritable_attribute("included_actions") || {}
+ @included_actions ||= read_inheritable_attribute("included_actions") || {}
end
# Returns a mapping between filters and actions that may not run them.
def excluded_actions #:nodoc:
- read_inheritable_attribute("excluded_actions") || {}
+ @excluded_actions ||= read_inheritable_attribute("excluded_actions") || {}
end
private