Sha256: 74b99336e5c7497a21f66e7857d8d2847e64f887254754efb2376a626b9c2cb6

Contents?: true

Size: 291 Bytes

Versions: 3

Compression:

Stored size: 291 Bytes

Contents

class Post < ActiveRecord::Base

	validates_presence_of :title, :message => "you need a title, bor"

	validates_length_of :title, :minimum => 5, :maximum => 15, :allow_blank => true

	validates_presence_of :view_count
	validates_numericality_of :view_count, :message => "NUMBERZ ONLY!"

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
validation_sync-0.0.4 spec/dummy/app/models/post.rb
validation_sync-0.0.3 spec/dummy/app/models/post.rb
validation_sync-0.0.2 spec/dummy/app/models/post.rb