aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/models/automobile.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/test/models/automobile.rb')
-rw-r--r--activemodel/test/models/automobile.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/activemodel/test/models/automobile.rb b/activemodel/test/models/automobile.rb
index 021ea61c80..4df2fe8b3a 100644
--- a/activemodel/test/models/automobile.rb
+++ b/activemodel/test/models/automobile.rb
@@ -3,10 +3,11 @@ class Automobile
validate :validations
- attr_accessor :make, :model
+ attr_accessor :make, :model, :approved
def validations
validates_presence_of :make
- validates_length_of :model, :within => 2..10
+ validates_length_of :model, within: 2..10
+ validates_acceptance_of :approved, allow_nil: false
end
-end \ No newline at end of file
+end