Sha256: dff94291b17402206b964c0b5c4e785b6297af298d0ed10934769295c366bb9c

Contents?: true

Size: 572 Bytes

Versions: 1

Compression:

Stored size: 572 Bytes

Contents

module Blacklight
  module Rendering
    class HelperMethod < AbstractStep
      def render
        if config.helper_method
          render_helper # short circut the rest of the steps
        else
          next_step(values)
        end
      end

      private

      def render_helper
        context.send(config.helper_method,
                     options.merge(document: document,
                                   field: config.field,
                                   config: config,
                                   value: values))
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
blacklight-7.0.0.rc1 app/presenters/blacklight/rendering/helper_method.rb