diff options
author | Kir Shatrov <shatrov@me.com> | 2017-07-16 20:11:16 +0300 |
---|---|---|
committer | Kir Shatrov <shatrov@me.com> | 2017-07-16 20:11:16 +0300 |
commit | d7b1521db83998fb57811ecc9d12b68e610a44bd (patch) | |
tree | 8789a99dad9b1cfbb8c7a1e58c7681f9d05df1ab /activemodel/lib/active_model/validations | |
parent | 83f39a3bcf3f50d12d41bff4a110c57e2e4be605 (diff) | |
download | rails-d7b1521db83998fb57811ecc9d12b68e610a44bd.tar.gz rails-d7b1521db83998fb57811ecc9d12b68e610a44bd.tar.bz2 rails-d7b1521db83998fb57811ecc9d12b68e610a44bd.zip |
Use frozen string literal in activemodel/
Diffstat (limited to 'activemodel/lib/active_model/validations')
14 files changed, 28 insertions, 0 deletions
diff --git a/activemodel/lib/active_model/validations/absence.rb b/activemodel/lib/active_model/validations/absence.rb index 4618f46e30..385d9f27e0 100644 --- a/activemodel/lib/active_model/validations/absence.rb +++ b/activemodel/lib/active_model/validations/absence.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module ActiveModel module Validations # == \Active \Model Absence Validator diff --git a/activemodel/lib/active_model/validations/acceptance.rb b/activemodel/lib/active_model/validations/acceptance.rb index a26c37daa5..f35e4dec7f 100644 --- a/activemodel/lib/active_model/validations/acceptance.rb +++ b/activemodel/lib/active_model/validations/acceptance.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module ActiveModel module Validations class AcceptanceValidator < EachValidator # :nodoc: diff --git a/activemodel/lib/active_model/validations/callbacks.rb b/activemodel/lib/active_model/validations/callbacks.rb index 4e94422cf1..4d0ab2a2fe 100644 --- a/activemodel/lib/active_model/validations/callbacks.rb +++ b/activemodel/lib/active_model/validations/callbacks.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module ActiveModel module Validations # == Active \Model \Validation \Callbacks diff --git a/activemodel/lib/active_model/validations/clusivity.rb b/activemodel/lib/active_model/validations/clusivity.rb index 18f1056e2b..0b9b5ce6a1 100644 --- a/activemodel/lib/active_model/validations/clusivity.rb +++ b/activemodel/lib/active_model/validations/clusivity.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "active_support/core_ext/range" module ActiveModel diff --git a/activemodel/lib/active_model/validations/confirmation.rb b/activemodel/lib/active_model/validations/confirmation.rb index 03585bf5e1..0abec56b68 100644 --- a/activemodel/lib/active_model/validations/confirmation.rb +++ b/activemodel/lib/active_model/validations/confirmation.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module ActiveModel module Validations class ConfirmationValidator < EachValidator # :nodoc: diff --git a/activemodel/lib/active_model/validations/exclusion.rb b/activemodel/lib/active_model/validations/exclusion.rb index d587079bd3..a6cbfcc813 100644 --- a/activemodel/lib/active_model/validations/exclusion.rb +++ b/activemodel/lib/active_model/validations/exclusion.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "clusivity" module ActiveModel diff --git a/activemodel/lib/active_model/validations/format.rb b/activemodel/lib/active_model/validations/format.rb index 98b3f6a8e5..7c3f091473 100644 --- a/activemodel/lib/active_model/validations/format.rb +++ b/activemodel/lib/active_model/validations/format.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module ActiveModel module Validations class FormatValidator < EachValidator # :nodoc: diff --git a/activemodel/lib/active_model/validations/helper_methods.rb b/activemodel/lib/active_model/validations/helper_methods.rb index 2176115334..730173f2f9 100644 --- a/activemodel/lib/active_model/validations/helper_methods.rb +++ b/activemodel/lib/active_model/validations/helper_methods.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module ActiveModel module Validations module HelperMethods # :nodoc: diff --git a/activemodel/lib/active_model/validations/inclusion.rb b/activemodel/lib/active_model/validations/inclusion.rb index 74dac3b7df..00e27b528a 100644 --- a/activemodel/lib/active_model/validations/inclusion.rb +++ b/activemodel/lib/active_model/validations/inclusion.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require_relative "clusivity" module ActiveModel diff --git a/activemodel/lib/active_model/validations/length.rb b/activemodel/lib/active_model/validations/length.rb index 940c58f3a7..d1a4197286 100644 --- a/activemodel/lib/active_model/validations/length.rb +++ b/activemodel/lib/active_model/validations/length.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module ActiveModel module Validations class LengthValidator < EachValidator # :nodoc: diff --git a/activemodel/lib/active_model/validations/numericality.rb b/activemodel/lib/active_model/validations/numericality.rb index fb053a4c4e..31750ba78e 100644 --- a/activemodel/lib/active_model/validations/numericality.rb +++ b/activemodel/lib/active_model/validations/numericality.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module ActiveModel module Validations class NumericalityValidator < EachValidator # :nodoc: diff --git a/activemodel/lib/active_model/validations/presence.rb b/activemodel/lib/active_model/validations/presence.rb index ce4106a5e1..8787a75afa 100644 --- a/activemodel/lib/active_model/validations/presence.rb +++ b/activemodel/lib/active_model/validations/presence.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module ActiveModel module Validations class PresenceValidator < EachValidator # :nodoc: diff --git a/activemodel/lib/active_model/validations/validates.rb b/activemodel/lib/active_model/validations/validates.rb index a8b958e974..43d9f82d9f 100644 --- a/activemodel/lib/active_model/validations/validates.rb +++ b/activemodel/lib/active_model/validations/validates.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "active_support/core_ext/hash/slice" module ActiveModel diff --git a/activemodel/lib/active_model/validations/with.rb b/activemodel/lib/active_model/validations/with.rb index 9227dd06ff..d777ac836e 100644 --- a/activemodel/lib/active_model/validations/with.rb +++ b/activemodel/lib/active_model/validations/with.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "active_support/core_ext/array/extract_options" module ActiveModel |