diff options
author | Matthew Draper <matthew@trebex.net> | 2017-08-16 19:47:37 +0930 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-16 19:47:37 +0930 |
commit | 7c8d50fec1c78c5edcb50503216235b00b2d8fe0 (patch) | |
tree | 39048bfa5f815b68894f06272a3150d9c816f663 /activerecord | |
parent | 0789d093f3473dd9bc95e387cc519072760a6759 (diff) | |
parent | 7c260ae20170159f85d8b7ded1209f12653934fc (diff) | |
download | rails-7c8d50fec1c78c5edcb50503216235b00b2d8fe0.tar.gz rails-7c8d50fec1c78c5edcb50503216235b00b2d8fe0.tar.bz2 rails-7c8d50fec1c78c5edcb50503216235b00b2d8fe0.zip |
Merge pull request #30210 from koic/fix_rubocop_offenses
Fix RuboCop offenses
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/rails/generators/active_record/application_record/application_record_generator.rb | 11 | ||||
-rw-r--r-- | activerecord/test/cases/attribute_set_test.rb | 2 |
2 files changed, 7 insertions, 6 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 diff --git a/activerecord/test/cases/attribute_set_test.rb b/activerecord/test/cases/attribute_set_test.rb index 006372a757..8be77ed88f 100644 --- a/activerecord/test/cases/attribute_set_test.rb +++ b/activerecord/test/cases/attribute_set_test.rb @@ -16,7 +16,7 @@ module ActiveRecord test "building with custom types" do builder = AttributeSet::Builder.new(foo: Type::Float.new) - attributes = builder.build_from_database({ foo: "3.3", bar: "4.4" }, bar: Type::Integer.new) + attributes = builder.build_from_database({ foo: "3.3", bar: "4.4" }, { bar: Type::Integer.new }) assert_equal 3.3, attributes[:foo].value assert_equal 4, attributes[:bar].value |