diff options
Diffstat (limited to 'activemodel/test/models/automobile.rb')
-rw-r--r-- | activemodel/test/models/automobile.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/activemodel/test/models/automobile.rb b/activemodel/test/models/automobile.rb new file mode 100644 index 0000000000..021ea61c80 --- /dev/null +++ b/activemodel/test/models/automobile.rb @@ -0,0 +1,12 @@ +class Automobile + include ActiveModel::Validations + + validate :validations + + attr_accessor :make, :model + + def validations + validates_presence_of :make + validates_length_of :model, :within => 2..10 + end +end
\ No newline at end of file |