Sha256: 8c3666799a30ec07947c38061bbe08c9aaf7b015ff0fbe5278f19ccfd4eab1be
Contents?: true
Size: 482 Bytes
Versions: 33
Compression:
Stored size: 482 Bytes
Contents
module CabooseStore class Message include ActiveModel::Validations include ActiveModel::Conversion extend ActiveModel::Naming attr_accessor :name, :email, :body validates :name, :email, :body, presence: true validates :email, format: { :with => %r{.+@.+\..+} }, allow_blank: false def initialize(attributes={}) attributes.each { |name, value| send("#{name}=", value) } end def persisted? false end end end
Version data entries
33 entries across 33 versions & 1 rubygems