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/relation.rb | |
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/relation.rb')
-rw-r--r-- | activerecord/lib/active_record/relation.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb index 0792ba8f76..e96adc9af8 100644 --- a/activerecord/lib/active_record/relation.rb +++ b/activerecord/lib/active_record/relation.rb @@ -62,7 +62,7 @@ module ActiveRecord @klass.connection.insert( im, - 'SQL', + "SQL", primary_key || false, primary_key_value, nil, @@ -86,7 +86,7 @@ module ActiveRecord @klass.connection.update( um, - 'SQL', + "SQL", bvs, ) end @@ -382,7 +382,7 @@ module ActiveRecord stmt.wheres = arel.constraints end - @klass.connection.update stmt, 'SQL', bound_attributes + @klass.connection.update stmt, "SQL", bound_attributes end # Updates an object (or multiple objects) and saves it to the database, if validations pass. @@ -533,7 +533,7 @@ module ActiveRecord stmt.wheres = arel.constraints end - affected = @klass.connection.delete(stmt, 'SQL', bound_attributes) + affected = @klass.connection.delete(stmt, "SQL", bound_attributes) reset affected @@ -671,7 +671,7 @@ module ActiveRecord def inspect entries = records.take([limit_value, 11].compact.min).map!(&:inspect) - entries[10] = '...' if entries.size == 11 + entries[10] = "..." if entries.size == 11 "#<#{self.class.name} [#{entries.join(', ')}]>" end @@ -726,7 +726,7 @@ module ActiveRecord return [] if string.blank? # always convert table names to downcase as in Oracle quoted table names are in uppercase # ignore raw_sql_ that is used by Oracle adapter as alias for limit/offset subqueries - string.scan(/([a-zA-Z_][.\w]+).?\./).flatten.map(&:downcase).uniq - ['raw_sql_'] + string.scan(/([a-zA-Z_][.\w]+).?\./).flatten.map(&:downcase).uniq - ["raw_sql_"] end end end |