mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Remove return, we are already returning self.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
This commit is contained in:
committed by
Santiago Pastorino
parent
1b6b80355c
commit
ac6e9447e5
@@ -235,12 +235,12 @@ module ActiveRecord
|
||||
|
||||
# Removes all records from this association. Returns +self+ so method calls may be chained.
|
||||
def clear
|
||||
return self if length.zero? # forces load_target if it hasn't happened already
|
||||
|
||||
if @reflection.options[:dependent] && @reflection.options[:dependent] == :destroy
|
||||
destroy_all
|
||||
else
|
||||
delete_all
|
||||
unless length.zero? # forces load_target if it hasn't happened already
|
||||
if @reflection.options[:dependent] && @reflection.options[:dependent] == :destroy
|
||||
destroy_all
|
||||
else
|
||||
delete_all
|
||||
end
|
||||
end
|
||||
|
||||
self
|
||||
|
||||
Reference in New Issue
Block a user