diff options
Diffstat (limited to 'activemodel/test/models')
-rw-r--r-- | activemodel/test/models/account.rb | 2 | ||||
-rw-r--r-- | activemodel/test/models/blog_post.rb | 2 | ||||
-rw-r--r-- | activemodel/test/models/contact.rb | 2 | ||||
-rw-r--r-- | activemodel/test/models/custom_reader.rb | 2 | ||||
-rw-r--r-- | activemodel/test/models/helicopter.rb | 2 | ||||
-rw-r--r-- | activemodel/test/models/person.rb | 6 | ||||
-rw-r--r-- | activemodel/test/models/person_with_validator.rb | 2 | ||||
-rw-r--r-- | activemodel/test/models/reply.rb | 2 | ||||
-rw-r--r-- | activemodel/test/models/sheep.rb | 2 | ||||
-rw-r--r-- | activemodel/test/models/topic.rb | 4 | ||||
-rw-r--r-- | activemodel/test/models/track_back.rb | 2 | ||||
-rw-r--r-- | activemodel/test/models/user.rb | 2 | ||||
-rw-r--r-- | activemodel/test/models/visitor.rb | 2 |
13 files changed, 31 insertions, 1 deletions
diff --git a/activemodel/test/models/account.rb b/activemodel/test/models/account.rb index eed668d38f..40408e5708 100644 --- a/activemodel/test/models/account.rb +++ b/activemodel/test/models/account.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Account include ActiveModel::ForbiddenAttributesProtection diff --git a/activemodel/test/models/blog_post.rb b/activemodel/test/models/blog_post.rb index 46eba857df..d4b02eeaa7 100644 --- a/activemodel/test/models/blog_post.rb +++ b/activemodel/test/models/blog_post.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Blog def self.use_relative_model_naming? true diff --git a/activemodel/test/models/contact.rb b/activemodel/test/models/contact.rb index 113ab0bc1f..c40a6d6f0e 100644 --- a/activemodel/test/models/contact.rb +++ b/activemodel/test/models/contact.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Contact extend ActiveModel::Naming include ActiveModel::Conversion diff --git a/activemodel/test/models/custom_reader.rb b/activemodel/test/models/custom_reader.rb index dc26bb10ff..df605e93d9 100644 --- a/activemodel/test/models/custom_reader.rb +++ b/activemodel/test/models/custom_reader.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CustomReader include ActiveModel::Validations diff --git a/activemodel/test/models/helicopter.rb b/activemodel/test/models/helicopter.rb index 933f3c463a..fe82c463d3 100644 --- a/activemodel/test/models/helicopter.rb +++ b/activemodel/test/models/helicopter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Helicopter include ActiveModel::Conversion end diff --git a/activemodel/test/models/person.rb b/activemodel/test/models/person.rb index e896e90f98..8dd8ceadad 100644 --- a/activemodel/test/models/person.rb +++ b/activemodel/test/models/person.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Person include ActiveModel::Validations extend ActiveModel::Translation @@ -7,6 +9,10 @@ class Person def condition_is_true true end + + def condition_is_false + false + end end class Person::Gender diff --git a/activemodel/test/models/person_with_validator.rb b/activemodel/test/models/person_with_validator.rb index 505ed880c1..44e78cbc29 100644 --- a/activemodel/test/models/person_with_validator.rb +++ b/activemodel/test/models/person_with_validator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class PersonWithValidator include ActiveModel::Validations diff --git a/activemodel/test/models/reply.rb b/activemodel/test/models/reply.rb index 3fe11043d2..6bb18f95fe 100644 --- a/activemodel/test/models/reply.rb +++ b/activemodel/test/models/reply.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "models/topic" class Reply < Topic diff --git a/activemodel/test/models/sheep.rb b/activemodel/test/models/sheep.rb index 7aba055c4f..30dd9ce192 100644 --- a/activemodel/test/models/sheep.rb +++ b/activemodel/test/models/sheep.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Sheep extend ActiveModel::Naming end diff --git a/activemodel/test/models/topic.rb b/activemodel/test/models/topic.rb index 192786c096..b0af00ee45 100644 --- a/activemodel/test/models/topic.rb +++ b/activemodel/test/models/topic.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Topic include ActiveModel::Validations include ActiveModel::Validations::Callbacks @@ -21,7 +23,7 @@ class Topic true end - def condition_is_true_but_its_not + def condition_is_false false end diff --git a/activemodel/test/models/track_back.rb b/activemodel/test/models/track_back.rb index 357ee37d6d..728a022db5 100644 --- a/activemodel/test/models/track_back.rb +++ b/activemodel/test/models/track_back.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Post class TrackBack def to_model diff --git a/activemodel/test/models/user.rb b/activemodel/test/models/user.rb index 6556b1a7d9..e98fd8a0a1 100644 --- a/activemodel/test/models/user.rb +++ b/activemodel/test/models/user.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class User extend ActiveModel::Callbacks include ActiveModel::SecurePassword diff --git a/activemodel/test/models/visitor.rb b/activemodel/test/models/visitor.rb index 22ad1a3c3d..9da004ffcc 100644 --- a/activemodel/test/models/visitor.rb +++ b/activemodel/test/models/visitor.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class Visitor extend ActiveModel::Callbacks include ActiveModel::SecurePassword |