Method: Binda::ComponentsHelper#get_sort_link_icon_by
- Defined in:
- app/helpers/binda/components_helper.rb
#get_sort_link_icon_by(arg) ⇒ string
Get sort link icon by argument
This method returns a Font Awesome icon
95 96 97 98 99 100 101 102 103 104 |
# File 'app/helpers/binda/components_helper.rb', line 95 def get_sort_link_icon_by arg case when params[:order].nil? '<i class="fas fa-sort-alpha-down"></i>' when params[:order][arg] == "DESC" '<i class="fas fa-sort-alpha-up"></i>' else '<i class="fas fa-sort-alpha-down"></i>' end end |