diff options
author | Xavier Noria <fxn@hashref.com> | 2016-08-08 01:05:28 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2016-08-08 01:12:38 +0200 |
commit | a9dc45459abcd9437085f4dd0aa3c9d0e64e062f (patch) | |
tree | fe160bcd744ad3dffbe901a4b44df2c2343130de /activesupport/test/callbacks_test.rb | |
parent | b45c9ca9b6571108242c1dfc3d3e160f56baf025 (diff) | |
download | rails-a9dc45459abcd9437085f4dd0aa3c9d0e64e062f.tar.gz rails-a9dc45459abcd9437085f4dd0aa3c9d0e64e062f.tar.bz2 rails-a9dc45459abcd9437085f4dd0aa3c9d0e64e062f.zip |
code gardening: removes redundant selfs
A few have been left for aesthetic reasons, but have made a pass
and removed most of them.
Note that if the method `foo` returns an array, `foo << 1`
is a regular push, nothing to do with assignments, so
no self required.
Diffstat (limited to 'activesupport/test/callbacks_test.rb')
-rw-r--r-- | activesupport/test/callbacks_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/test/callbacks_test.rb b/activesupport/test/callbacks_test.rb index 69b15b0086..913b7c8cfc 100644 --- a/activesupport/test/callbacks_test.rb +++ b/activesupport/test/callbacks_test.rb @@ -804,7 +804,7 @@ module CallbacksTest class WriterSkipper < Person attr_accessor :age - skip_callback :save, :before, :before_save_method, if: lambda {self.age > 21} + skip_callback :save, :before, :before_save_method, if: -> { age > 21 } end class WriterCallbacksTest < ActiveSupport::TestCase |