Skip to content

Instantly share code, notes, and snippets.

@doolin
Created December 21, 2022 13:40
Show Gist options
  • Save doolin/89c8a11806075369399f732aad577609 to your computer and use it in GitHub Desktop.
Save doolin/89c8a11806075369399f732aad577609 to your computer and use it in GitHub Desktop.
class Order
include ActiveModel::Validations
attr_reader :name
validates :name, presence: true
def initialize(name)
@name = name
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment