Sha256: d790d455bc9ba35e8636e1dfc3691947d9af150bfae26fb6b4d0d2d84481324c

Contents?: true

Size: 404 Bytes

Versions: 15

Compression:

Stored size: 404 Bytes

Contents

module Myreplicator
  module ApplicationHelper

    def sortable(column, title = nil)
      title ||= column.titleize
      css_class = column == sort_column ? "current #{sort_direction}" : nil
      direction = column == sort_column && sort_direction == "asc" ? "desc" : "asc"
      link_to content_tag(:span, title), {:sort => column, :direction => direction}, {:class => css_class}
    end

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
myreplicator-0.0.16 app/helpers/myreplicator/application_helper.rb
myreplicator-0.0.15 app/helpers/myreplicator/application_helper.rb
myreplicator-0.0.14 app/helpers/myreplicator/application_helper.rb
myreplicator-0.0.13 app/helpers/myreplicator/application_helper.rb
myreplicator-0.0.12 app/helpers/myreplicator/application_helper.rb
myreplicator-0.0.11 app/helpers/myreplicator/application_helper.rb
myreplicator-0.0.10 app/helpers/myreplicator/application_helper.rb
myreplicator-0.0.9 app/helpers/myreplicator/application_helper.rb
myreplicator-0.0.7 app/helpers/myreplicator/application_helper.rb
myreplicator-0.0.6 app/helpers/myreplicator/application_helper.rb
myreplicator-0.0.5 app/helpers/myreplicator/application_helper.rb
myreplicator-0.0.4 app/helpers/myreplicator/application_helper.rb
myreplicator-0.0.3 app/helpers/myreplicator/application_helper.rb
myreplicator-0.0.2 app/helpers/myreplicator/application_helper.rb
myreplicator-0.0.1 app/helpers/myreplicator/application_helper.rb