aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/models
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/test/models')
-rw-r--r--activemodel/test/models/custom_reader.rb4
-rw-r--r--activemodel/test/models/person_with_validator.rb2
-rw-r--r--activemodel/test/models/sheep.rb1
3 files changed, 3 insertions, 4 deletions
diff --git a/activemodel/test/models/custom_reader.rb b/activemodel/test/models/custom_reader.rb
index 14a8be9ebc..2fbcf79c3d 100644
--- a/activemodel/test/models/custom_reader.rb
+++ b/activemodel/test/models/custom_reader.rb
@@ -4,11 +4,11 @@ class CustomReader
def initialize(data = {})
@data = data
end
-
+
def []=(key, value)
@data[key] = value
end
-
+
def read_attribute_for_validation(key)
@data[key]
end
diff --git a/activemodel/test/models/person_with_validator.rb b/activemodel/test/models/person_with_validator.rb
index f9763ea853..f6f665ccee 100644
--- a/activemodel/test/models/person_with_validator.rb
+++ b/activemodel/test/models/person_with_validator.rb
@@ -1,6 +1,6 @@
class PersonWithValidator
include ActiveModel::Validations
-
+
class PresenceValidator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
record.errors[attribute] << "Local validator#{options[:custom]}" if value.blank?
diff --git a/activemodel/test/models/sheep.rb b/activemodel/test/models/sheep.rb
index 175dbe6477..7aba055c4f 100644
--- a/activemodel/test/models/sheep.rb
+++ b/activemodel/test/models/sheep.rb
@@ -1,4 +1,3 @@
class Sheep
extend ActiveModel::Naming
end
- \ No newline at end of file