Sha256: b707d5ef86641c5267745214177ff22a28dbb8e03bd2e0af0a8cbb0d3021c122
Contents?: true
Size: 397 Bytes
Versions: 5
Compression:
Stored size: 397 Bytes
Contents
module Admin::ResourceHelper def sortable(column, title = nil) title ||= resource_class.human_attribute_name(attr) css_class = column == sort_column ? "current #{sort_direction}" : nil direction = column == sort_column && sort_direction == "asc" ? "desc" : "asc" link_to title, params.merge(:sort => column, :direction => direction, :page=>nil), {:class => css_class} end end
Version data entries
5 entries across 5 versions & 1 rubygems