From 18a2513729ab90b04b1c86963e7d5b9213270c81 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sat, 6 Aug 2016 18:38:02 +0200 Subject: applies new string literal convention in activemodel/lib The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default. --- activemodel/lib/active_model/attribute_methods.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'activemodel/lib/active_model/attribute_methods.rb') diff --git a/activemodel/lib/active_model/attribute_methods.rb b/activemodel/lib/active_model/attribute_methods.rb index 140eb9420e..96709486f3 100644 --- a/activemodel/lib/active_model/attribute_methods.rb +++ b/activemodel/lib/active_model/attribute_methods.rb @@ -1,6 +1,6 @@ -require 'concurrent/map' -require 'mutex_m' -require 'active_support/core_ext/regexp' +require "concurrent/map" +require "mutex_m" +require "active_support/core_ext/regexp" module ActiveModel # Raised when an attribute is not defined. @@ -394,7 +394,7 @@ module ActiveModel AttributeMethodMatch = Struct.new(:target, :attr_name, :method_name) def initialize(options = {}) - @prefix, @suffix = options.fetch(:prefix, ''), options.fetch(:suffix, '') + @prefix, @suffix = options.fetch(:prefix, ""), options.fetch(:suffix, "") @regex = /^(?:#{Regexp.escape(@prefix)})(.*)(?:#{Regexp.escape(@suffix)})$/ @method_missing_target = "#{@prefix}attribute#{@suffix}" @method_name = "#{prefix}%s#{suffix}" -- cgit v1.2.3