Skip to content

Commit abf0843

Browse files
committed
fix(ControllerLifecycle) use *_filter hooks to support old Rails
1 parent 92f27de commit abf0843

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Rakefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ Rake::TestTask.new(:test) do |t|
3434
t.libs << 'test'
3535
t.pattern = ENV['TEST_PATTERN'] || 'test/**/*_test.rb'
3636
t.verbose = ENV['TEST_VERBOSE'] == '1'
37-
t.warning = true
3837
end
3938

4039
task default: :test

lib/react/rails/controller_lifecycle.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ module ControllerLifecycle
44
extend ActiveSupport::Concern
55

66
included do
7-
before_action :setup_react_component_helper
8-
after_action :teardown_react_component_helper
7+
# use old names to support Rails 3
8+
before_filter :setup_react_component_helper
9+
after_filter :teardown_react_component_helper
910
end
1011

1112
def setup_react_component_helper

0 commit comments

Comments
 (0)