Sha256: b793218e6bfb155e89e2434582830ee7c5f4f092049f189de0db2d1863644491

Contents?: true

Size: 335 Bytes

Versions: 1

Compression:

Stored size: 335 Bytes

Contents

# frozen_string_literal: true

module Phlexible
  module Rails
    module AnchorElement
      # @override Calls `url_for` for the :href attribute.
      def a(**attributes, &block)
        attributes[:href] = helpers.url_for(attributes[:href]) if attributes.key?(:href)

        super(**attributes, &block)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
phlexible-0.1.0 lib/phlexible/rails/anchor_element.rb