Sha256: 4ce045b2fd68bad03f136fa544439794279ef9001858e891a5b0f9d468df51c1
Contents?: true
Size: 409 Bytes
Versions: 13
Compression:
Stored size: 409 Bytes
Contents
class Topic include ActiveModel::Validations include ActiveModel::Conversion attr_accessor :title, :author, :body, :subtitle validates :title, length: { minimum: 5 } validates :author, presence: true validates :body, length: { minimum: 10 } def initialize(attributes = {}) attributes.each do |name, value| send("#{name}=", value) end end def persisted? false end end
Version data entries
13 entries across 13 versions & 1 rubygems