Module: Sort::LinkForHelper
- Includes:
- DescriptionForHelper, PathForHelper
- Included in:
- ActionSet::Helpers::HelperMethods
- Defined in:
- lib/action_set/helpers/sort/link_for_helper.rb
Instance Method Summary collapse
Methods included from DescriptionForHelper
Methods included from NextDirectionForHelper
Methods included from FormattingHelper
#ascending_str, #descending_str
Methods included from CurrentDirectionForHelper
Methods included from Params::CurrentHelper
Methods included from PathForHelper
Instance Method Details
#sort_link_for(attribute, name = nil, **attributes) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/action_set/helpers/sort/link_for_helper.rb', line 11 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 |