diff options
author | Xavier Noria <fxn@hashref.com> | 2016-08-06 19:38:33 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2016-08-06 19:38:33 +0200 |
commit | 5c315a8fa6296904f5e0ba8da919fc395548cf98 (patch) | |
tree | c20da9c73b5db9caa8c2aa711955ed17f01d396d /activesupport/test/callback_inheritance_test.rb | |
parent | d22e522179c1c90e658c3ed0e9b972ec62306209 (diff) | |
download | rails-5c315a8fa6296904f5e0ba8da919fc395548cf98.tar.gz rails-5c315a8fa6296904f5e0ba8da919fc395548cf98.tar.bz2 rails-5c315a8fa6296904f5e0ba8da919fc395548cf98.zip |
modernizes hash syntax in activesupport
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 ab9627dfba..d1c217177d 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 |