Sha256: 51f8e93f399e25e00b1271950003b1476e3459e61a243fd7fd6961be0756a4eb

Contents?: true

Size: 383 Bytes

Versions: 1

Compression:

Stored size: 383 Bytes

Contents

module Draper
  # Provides access to helper methods - both Rails built-in helpers, and those
  # defined in your application.
  class HelperProxy

    # Sends helper methods to the view context.
    def method_missing(method, *args, &block)
      view_context.send(method, *args, &block)
    end

    private

    def view_context
      Draper::ViewContext.current
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
draper-1.0.0 lib/draper/helper_proxy.rb