Sha256: e7a5cb191a379372676b059a2b9cc78d785422e6f4ec1bd0878dda67cbbd752f
Contents?: true
Size: 622 Bytes
Versions: 10
Compression:
Stored size: 622 Bytes
Contents
# frozen_string_literal: true module Decidim module DecidimAwesome module MenuItemPresenterOverride extend ActiveSupport::Concern included do def link_to(name = nil, options = nil, html_options = nil, &block) html_options ||= {} html_options[:target] = @menu_item.try(:target) options ||= html_options @view.link_to(name, options, html_options, &block) end def active return @menu_item.active.call(url, @view) if @menu_item.try(:active).respond_to?(:call) @menu_item&.active end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems