diff options
author | Xavier Noria <fxn@hashref.com> | 2016-08-06 18:24:04 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2016-08-06 18:26:45 +0200 |
commit | 4df2b779ddfcb27761c71e00e2b241bfa06a0950 (patch) | |
tree | 7a83cce62195f7b20afea6d6a8873b953d25cb84 /activerecord/lib/active_record/fixture_set | |
parent | a731125f12c5834de7eae3455fad63ea4d348034 (diff) | |
download | rails-4df2b779ddfcb27761c71e00e2b241bfa06a0950.tar.gz rails-4df2b779ddfcb27761c71e00e2b241bfa06a0950.tar.bz2 rails-4df2b779ddfcb27761c71e00e2b241bfa06a0950.zip |
applies new string literal convention in activerecord/lib
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
Diffstat (limited to 'activerecord/lib/active_record/fixture_set')
-rw-r--r-- | activerecord/lib/active_record/fixture_set/file.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/fixture_set/file.rb b/activerecord/lib/active_record/fixture_set/file.rb index e4a44244e2..0888208709 100644 --- a/activerecord/lib/active_record/fixture_set/file.rb +++ b/activerecord/lib/active_record/fixture_set/file.rb @@ -1,5 +1,5 @@ -require 'erb' -require 'yaml' +require "erb" +require "yaml" module ActiveRecord class FixtureSet @@ -24,17 +24,17 @@ module ActiveRecord end def model_class - config_row['model_class'] + config_row["model_class"] end private def rows - @rows ||= raw_rows.reject { |fixture_name, _| fixture_name == '_fixture' } + @rows ||= raw_rows.reject { |fixture_name, _| fixture_name == "_fixture" } end def config_row @config_row ||= begin - row = raw_rows.find { |fixture_name, _| fixture_name == '_fixture' } + row = raw_rows.find { |fixture_name, _| fixture_name == "_fixture" } if row row.last else @@ -66,7 +66,7 @@ module ActiveRecord # Validate our unmarshalled data. def validate(data) unless Hash === data || YAML::Omap === data - raise Fixture::FormatError, 'fixture is not a hash' + raise Fixture::FormatError, "fixture is not a hash" end raise Fixture::FormatError unless data.all? { |name, row| Hash === row } |