Instantly share code, notes, and snippets.

Embed
What would you like to do?
Create Post Form
class CreatePostForm
validations do
optional(:title).maybe(:string)
optional(:content).maybe(:string)
required(:status).value(included_in?: ["draft", "published"])
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment