diff options
Diffstat (limited to 'activesupport/test/callback_inheritance_test.rb')
-rw-r--r-- | activesupport/test/callback_inheritance_test.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/activesupport/test/callback_inheritance_test.rb b/activesupport/test/callback_inheritance_test.rb index d1c217177d..9e2f7527e0 100644 --- a/activesupport/test/callback_inheritance_test.rb +++ b/activesupport/test/callback_inheritance_test.rb @@ -9,8 +9,8 @@ class GrandParent end define_callbacks :dispatch - set_callback :dispatch, :before, :before1, :before2, if: proc {|c| c.action_name == "index" || c.action_name == "update" } - set_callback :dispatch, :after, :after1, :after2, if: proc {|c| c.action_name == "update" || c.action_name == "delete" } + set_callback :dispatch, :before, :before1, :before2, if: proc { |c| c.action_name == "index" || c.action_name == "update" } + set_callback :dispatch, :after, :after1, :after2, if: proc { |c| c.action_name == "update" || c.action_name == "delete" } def before1 @log << "before1" @@ -37,12 +37,12 @@ class GrandParent end class Parent < GrandParent - skip_callback :dispatch, :before, :before2, unless: proc {|c| c.action_name == "update" } - skip_callback :dispatch, :after, :after2, unless: proc {|c| c.action_name == "delete" } + skip_callback :dispatch, :before, :before2, unless: proc { |c| c.action_name == "update" } + skip_callback :dispatch, :after, :after2, unless: proc { |c| c.action_name == "delete" } end class Child < GrandParent - skip_callback :dispatch, :before, :before2, unless: proc {|c| c.action_name == "update" }, if: :state_open? + skip_callback :dispatch, :before, :before2, unless: proc { |c| c.action_name == "update" }, if: :state_open? def state_open? @state == :open |