Sha256: 6c99f444a3db36fa5638922852c3caffdaea38d3cbca8943eaf5f646b6692f61
Contents?: true
Size: 661 Bytes
Versions: 8
Compression:
Stored size: 661 Bytes
Contents
# frozen_string_literal: true module Trailblazer class Finder module Activities # Params Activity class PrepareParams < Trailblazer::Activity::Railway def validate_params(_ctx, **) # Should probably validate some things here at some point true end def invalid_params_error(_ctx, **) # (ctx[:errors] ||= []) << {params: "One or more parameters are invalid"} end def set_params(ctx, **) ctx[:params] = ctx[:options][:params] || {} end step :validate_params fail :invalid_params_error step :set_params end end end end
Version data entries
8 entries across 8 versions & 1 rubygems