Slide 8
Slide 8 text
class Server < ApplicationRecord
validates :name, :length => { :in => 3..30 }
validates :uri, :length => { :in => 20..200 }
validates :ordinal, :numericality => true, :uniqueness => true
end
class Server < ApplicationRecord
attr_accessor name (): String
attr_accessor uri (): String
def name_changed: () -> bool
def name_change: () -> [String?, String?]
def name_will_change: () -> void
def name_was: () -> String?
def name_previously_changed?: () -> bool
def name_previously_was: () -> String?
def name_before_last_save: () -> String?
def uri_changed: () -> bool
def uri_change: () -> [String?, String?]