We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a Porch::Step module that allows the creation of steps to be easier with validation methods built in.
Porch::Step
You can define steps as classes and include some nice helper methods. (COMING SOON)
# app/services/steps/create_user.rb require "porch" class CreateUser include Porch::Step params do required(:email).filled(type?: :str, format?: RegEx.email_address) required(:password).filled(type?: :str, min_size?: 8) end def call(context) context.user = User.create email: context.email, password: context.password context.fail! context.user.errors unless context.user.valid? end end
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Create a
Porch::Step
module that allows the creation of steps to be easier with validation methods built in.You can define steps as classes and include some nice helper methods. (COMING SOON)
The text was updated successfully, but these errors were encountered: