Sha256: 24aa86a1771293a6568b2fe1ec055abf4aed47f559e8458ccc74b7823b65ed02
Contents?: true
Size: 665 Bytes
Versions: 1
Compression:
Stored size: 665 Bytes
Contents
# frozen_string_literal: true module Trailblazer class Finder module Activity # 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
trailblazer-finder-0.10.0 | lib/trailblazer/finder/activity/prepare_params.rb |