lib/sn_foil/contexts/show_context.rb in snfoil-0.8.5 vs lib/sn_foil/contexts/show_context.rb in snfoil-0.9.0

- old
+ new

@@ -27,12 +27,11 @@ end def setup_show_object(id: nil, object: nil, **options) raise ArgumentError, 'one of the following keywords is required: id, object' unless id || object - options[:object] = wrap_object(object || scope.resolve.find(id)) - options + options.merge! object: wrap_object(object || scope.resolve.find(id)) end def setup_show_hooks self.class.i_setup_show_hooks || [] end @@ -51,12 +50,12 @@ private def before_setup_show(**options) options = setup(**options) - options = setup_hooks.reduce(options) { |opts, hook| run_hook(hook, opts) } + options = setup_hooks.reduce(options) { |opts, hook| run_hook(hook, **opts) } options = setup_show(**options) - setup_show_hooks.reduce(options) { |opts, hook| run_hook(hook, opts) } + setup_show_hooks.reduce(options) { |opts, hook| run_hook(hook, **opts) } end end end end