lib/stache/view_context.rb in stache-1.1.1 vs lib/stache/view_context.rb in stache-1.2.0

- old
+ new

@@ -13,9 +13,13 @@ def set_current_view_context Stache::ViewContext.current = self.view_context end def self.included(source) - source.send(:before_filter, :set_current_view_context) if source.respond_to?(:before_filter) + if source.respond_to?(:before_action) # Rails 4+ + source.send(:before_action, :set_current_view_context) + elsif source.respond_to?(:before_filter) # Rails 3 + source.send(:before_filter, :set_current_view_context) + end end end end