Sha256: b5e29d75e71c026a2cc74831b985977d0a53374d2927d7d54fb8e7685949e872

Contents?: true

Size: 497 Bytes

Versions: 11

Compression:

Stored size: 497 Bytes

Contents

# frozen_string_literal: true

require_relative './path_for_helper'
require_relative './description_for_helper'

module Sort
  module LinkForHelper
    include Sort::PathForHelper
    include Sort::DescriptionForHelper

    def sort_link_for(attribute, name = nil, **attributes)
      link_to(name || attribute.to_s.titleize,
              sort_path_for(attribute),
              **attributes.merge(
                'aria-label': sort_description_for(attribute)
              ))
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
actionset-0.11.0 lib/action_set/helpers/sort/link_for_helper.rb
actionset-0.10.0 lib/action_set/helpers/sort/link_for_helper.rb
actionset-0.9.2 lib/action_set/helpers/sort/link_for_helper.rb
actionset-0.9.1 lib/action_set/helpers/sort/link_for_helper.rb
actionset-0.8.2 lib/action_set/helpers/sort/link_for_helper.rb
actionset-0.8.1 lib/action_set/helpers/sort/link_for_helper.rb
actionset-0.8.0 lib/action_set/helpers/sort/link_for_helper.rb
actionset-0.7.0 lib/action_set/helpers/sort/link_for_helper.rb
actionset-0.6.0 lib/action_set/helpers/sort/link_for_helper.rb
actionset-0.5.4 lib/action_set/helpers/sort/link_for_helper.rb
actionset-0.5.3 lib/action_set/helpers/sort/link_for_helper.rb