Class: Trailblazer::Operation::Finder
- Inherits:
-
Object
- Object
- Trailblazer::Operation::Finder
- Defined in:
- lib/trailblazer/operation/finder.rb
Defined Under Namespace
Classes: Builder
Instance Method Summary collapse
Instance Method Details
#call(ctx, **options) ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/trailblazer/operation/finder.rb', line 16 def call(ctx, **) builder = Finder::Builder.new ctx[:finder] = finder = builder.call(, [:params]) ctx[:model] = finder # Don't like it, but somehow it's needed if contracts are loaded ctx[:"result.finder"] = Result.new(!finder.nil?, {}) ctx[:"result.finder"].success? end |