From a9dc45459abcd9437085f4dd0aa3c9d0e64e062f Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Mon, 8 Aug 2016 01:05:28 +0200 Subject: 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. --- railties/lib/rails/generators/resource_helpers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/lib/rails/generators/resource_helpers.rb') diff --git a/railties/lib/rails/generators/resource_helpers.rb b/railties/lib/rails/generators/resource_helpers.rb index c7829869ef..6d80003271 100644 --- a/railties/lib/rails/generators/resource_helpers.rb +++ b/railties/lib/rails/generators/resource_helpers.rb @@ -17,7 +17,7 @@ module Rails controller_name = name if options[:model_name] self.name = options[:model_name] - assign_names!(self.name) + assign_names!(name) end assign_controller_names!(controller_name.pluralize) -- cgit v1.2.3