Sha256: 80c49cd3d49276156a90f16c67ac17451346d7f6198cf41ce81081f4bcd3d89f
Contents?: true
Size: 284 Bytes
Versions: 6
Compression:
Stored size: 284 Bytes
Contents
class Vehicle < ActiveRecord::Base attr_accessible :name, :mass unless Rails::VERSION::MAJOR > 3 cti_base_class validates :name, :presence => true validate do |vehicle| errors.add(:base, "Block validation failed: name can't be blank") if vehicle.name.blank? end end
Version data entries
6 entries across 6 versions & 1 rubygems