Sha256: 66959ee048118aa02636419d17a14ee36caa206c3ce746984f500160c1375356

Contents?: true

Size: 339 Bytes

Versions: 22

Compression:

Stored size: 339 Bytes

Contents

class Post < Edifice::FormModel
  attr_accessor :title
  attr_accessor :message
  attr_accessor :email
  
  # just check the email has an @ and a dot. Anything else is false economy
  validates :email, :presence => true, :format => {:with => /^.+@.+\..+$/}
  validates :title, :presence => true
  validates :message, :presence => true
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
edifice-1.0 test/rails3/app/models/post.rb
edifice-0.10.3 test/rails3/app/models/post.rb
edifice-0.10.2 test/rails3/app/models/post.rb
edifice-0.10.1 test/rails3/app/models/post.rb
edifice-0.10.0 test/rails3/app/models/post.rb
edifice-0.9.0 test/rails3/app/models/post.rb
edifice-0.8.0 test/rails3/app/models/post.rb
edifice-0.7.3 test/rails3/app/models/post.rb
edifice-0.7.2 test/rails3/app/models/post.rb
edifice-0.7.1 test/rails3/app/models/post.rb
edifice-0.7.0 test/rails3/app/models/post.rb
edifice-0.6.9 test/rails3/app/models/post.rb
edifice-0.6.8 test/rails3/app/models/post.rb
edifice-0.6.7 test/rails3/app/models/post.rb
edifice-0.6.6 test/rails3/app/models/post.rb
edifice-0.6.5 test/rails3/app/models/post.rb
edifice-0.6.4 test/rails3/app/models/post.rb
edifice-0.6.3 test/rails3/app/models/post.rb
edifice-0.6.2 test/rails3/app/models/post.rb
edifice-0.6.1 test/rails3/app/models/post.rb