molten-trunk/molten5_withgrid/app/helpers/home_helper.rb
def link_to_sort(name,column)
    if column == @sort
      order = ('ASC' == @order ? 'DESC' : 'ASC')
    else
      order = 'ASC'
    end
    link = link_to(name, params.merge({:sort => column, :order => order}))
    image = build_sort_image(column,order)
    "#{link} #{image}"
  end
# Creates a link to sort the results by the specified column.
Creates a link to sort the results by the specified column.
Creates a link to sort the results by the specified column .
def link_to_sort(name,column)
    if column == @sort
      order = ('ASC' == @order ? 'DESC' : 'ASC')
    else
      order = 'ASC'
    end
    link = link_to(name, params.merge({:sort => column, :order => order}))
    image = build_sort_image(column,order)
    "#{link} #{image}"
  end
def link_to_sort ( name , column ) if column == @sort order = ( 'ASC' == @order ? 'DESC' : 'ASC' ) else order = 'ASC' end link = link_to ( name , params . merge ( { :sort => column , :order => order } ) ) image = build_sort_image ( column , order ) "#{link} #{image}" end
Creates a link to sort the results by the specified column.
Creates a link to sort the results by the specified column .
name
column