diff options
author | Koichi ITO <koic.ito@gmail.com> | 2017-08-12 20:31:46 +0900 |
---|---|---|
committer | Koichi ITO <koic.ito@gmail.com> | 2017-08-16 17:55:25 +0900 |
commit | 7c260ae20170159f85d8b7ded1209f12653934fc (patch) | |
tree | 7a47c50110652ed74e5984e59d50699e20b64f30 /activerecord/lib/rails/generators | |
parent | 11fd246d8f6406aa5165ebf45ca8f17c67716f7e (diff) | |
download | rails-7c260ae20170159f85d8b7ded1209f12653934fc.tar.gz rails-7c260ae20170159f85d8b7ded1209f12653934fc.tar.bz2 rails-7c260ae20170159f85d8b7ded1209f12653934fc.zip |
Fix RuboCop offenses
And enable `context_dependent` of Style/BracesAroundHashParameters cop.
Diffstat (limited to 'activerecord/lib/rails/generators')
-rw-r--r-- | activerecord/lib/rails/generators/active_record/application_record/application_record_generator.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/activerecord/lib/rails/generators/active_record/application_record/application_record_generator.rb b/activerecord/lib/rails/generators/active_record/application_record/application_record_generator.rb index d18330f5b2..35d5664400 100644 --- a/activerecord/lib/rails/generators/active_record/application_record/application_record_generator.rb +++ b/activerecord/lib/rails/generators/active_record/application_record/application_record_generator.rb @@ -15,11 +15,12 @@ module ActiveRecord private def application_record_file_name - @application_record_file_name ||= if namespaced? - "app/models/#{namespaced_path}/application_record.rb" - else - "app/models/application_record.rb" - end + @application_record_file_name ||= + if namespaced? + "app/models/#{namespaced_path}/application_record.rb" + else + "app/models/application_record.rb" + end end end end |