diff --git a/lib/trailblazer/endpoint/controller.rb b/lib/trailblazer/endpoint/controller.rb index 06de51b..b42ce90 100644 --- a/lib/trailblazer/endpoint/controller.rb +++ b/lib/trailblazer/endpoint/controller.rb @@ -58,7 +58,7 @@ def self.included(includer) module Rails module Process def send_action(action_name) - puts "@@@@@>>>>>>> #{action_name.inspect}" + # puts "@@@@@>>>>>>> #{action_name.inspect}" dsl = send(action_name) # call the actual controller action. diff --git a/lib/trailblazer/endpoint/options.rb b/lib/trailblazer/endpoint/options.rb index e3155cc..9acb9fe 100644 --- a/lib/trailblazer/endpoint/options.rb +++ b/lib/trailblazer/endpoint/options.rb @@ -77,6 +77,7 @@ def self.add(normalizer, directive_name, options) def self.CallDirective(callable, option_name) ->((ctx, flow_options), *) { + ctx ||= {} config = callable.(ctx, **ctx) # e.g. ApplicationController.options_for_endpoint # ctx[option_name] = ctx[option_name].merge(config)