From d22e522179c1c90e658c3ed0e9b972ec62306209 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sat, 6 Aug 2016 19:37:57 +0200 Subject: modernizes hash syntax in activerecord --- activerecord/test/migrations/decimal/1_give_me_big_numbers.rb | 8 ++++---- activerecord/test/migrations/magic/1_currencies_have_symbols.rb | 4 ++-- activerecord/test/migrations/missing/4_innocent_jointable.rb | 2 +- activerecord/test/migrations/valid/3_innocent_jointable.rb | 2 +- .../valid_with_subdirectories/sub1/3_innocent_jointable.rb | 2 +- .../20100301010101_valid_with_timestamps_innocent_jointable.rb | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) (limited to 'activerecord/test/migrations') diff --git a/activerecord/test/migrations/decimal/1_give_me_big_numbers.rb b/activerecord/test/migrations/decimal/1_give_me_big_numbers.rb index 549647de86..43c79bc20b 100644 --- a/activerecord/test/migrations/decimal/1_give_me_big_numbers.rb +++ b/activerecord/test/migrations/decimal/1_give_me_big_numbers.rb @@ -1,10 +1,10 @@ class GiveMeBigNumbers < ActiveRecord::Migration::Current def self.up create_table :big_numbers do |table| - table.column :bank_balance, :decimal, :precision => 10, :scale => 2 - table.column :big_bank_balance, :decimal, :precision => 15, :scale => 2 - table.column :world_population, :decimal, :precision => 10 - table.column :my_house_population, :decimal, :precision => 2 + table.column :bank_balance, :decimal, precision: 10, scale: 2 + table.column :big_bank_balance, :decimal, precision: 15, scale: 2 + table.column :world_population, :decimal, precision: 10 + table.column :my_house_population, :decimal, precision: 2 table.column :value_of_e, :decimal end end diff --git a/activerecord/test/migrations/magic/1_currencies_have_symbols.rb b/activerecord/test/migrations/magic/1_currencies_have_symbols.rb index 53b263bf55..d4b0e6cd95 100644 --- a/activerecord/test/migrations/magic/1_currencies_have_symbols.rb +++ b/activerecord/test/migrations/magic/1_currencies_have_symbols.rb @@ -2,8 +2,8 @@ class CurrenciesHaveSymbols < ActiveRecord::Migration::Current def self.up - # We use ¤ for default currency symbol - add_column "currencies", "symbol", :string, :default => "¤" + # We use € for default currency symbol + add_column "currencies", "symbol", :string, default: "€" end def self.down diff --git a/activerecord/test/migrations/missing/4_innocent_jointable.rb b/activerecord/test/migrations/missing/4_innocent_jointable.rb index 20fe183777..bd3bf21576 100644 --- a/activerecord/test/migrations/missing/4_innocent_jointable.rb +++ b/activerecord/test/migrations/missing/4_innocent_jointable.rb @@ -1,6 +1,6 @@ class InnocentJointable < ActiveRecord::Migration::Current def self.up - create_table("people_reminders", :id => false) do |t| + create_table("people_reminders", id: false) do |t| t.column :reminder_id, :integer t.column :person_id, :integer end diff --git a/activerecord/test/migrations/valid/3_innocent_jointable.rb b/activerecord/test/migrations/valid/3_innocent_jointable.rb index 20fe183777..bd3bf21576 100644 --- a/activerecord/test/migrations/valid/3_innocent_jointable.rb +++ b/activerecord/test/migrations/valid/3_innocent_jointable.rb @@ -1,6 +1,6 @@ class InnocentJointable < ActiveRecord::Migration::Current def self.up - create_table("people_reminders", :id => false) do |t| + create_table("people_reminders", id: false) do |t| t.column :reminder_id, :integer t.column :person_id, :integer end diff --git a/activerecord/test/migrations/valid_with_subdirectories/sub1/3_innocent_jointable.rb b/activerecord/test/migrations/valid_with_subdirectories/sub1/3_innocent_jointable.rb index 20fe183777..bd3bf21576 100644 --- a/activerecord/test/migrations/valid_with_subdirectories/sub1/3_innocent_jointable.rb +++ b/activerecord/test/migrations/valid_with_subdirectories/sub1/3_innocent_jointable.rb @@ -1,6 +1,6 @@ class InnocentJointable < ActiveRecord::Migration::Current def self.up - create_table("people_reminders", :id => false) do |t| + create_table("people_reminders", id: false) do |t| t.column :reminder_id, :integer t.column :person_id, :integer end diff --git a/activerecord/test/migrations/valid_with_timestamps/20100301010101_valid_with_timestamps_innocent_jointable.rb b/activerecord/test/migrations/valid_with_timestamps/20100301010101_valid_with_timestamps_innocent_jointable.rb index bf934576c9..be24de6d70 100644 --- a/activerecord/test/migrations/valid_with_timestamps/20100301010101_valid_with_timestamps_innocent_jointable.rb +++ b/activerecord/test/migrations/valid_with_timestamps/20100301010101_valid_with_timestamps_innocent_jointable.rb @@ -1,6 +1,6 @@ class ValidWithTimestampsInnocentJointable < ActiveRecord::Migration::Current def self.up - create_table("people_reminders", :id => false) do |t| + create_table("people_reminders", id: false) do |t| t.column :reminder_id, :integer t.column :person_id, :integer end -- cgit v1.2.3