Sha256: 65cf804f5a8dbef1a1941d84d9e938895afd777a20e07d124d20aae30d165e04
Contents?: true
Size: 487 Bytes
Versions: 1
Compression:
Stored size: 487 Bytes
Contents
require "active_support/concern" module Redmine module Generators module SortableHeaders extend ActiveSupport::Concern def sortable_header(name, caption = "field_#{name}", order = nil) if parent_options[:sort] order = ", " + key_value(:default_order, %("#{order}")) if order %(<%= sort_header_tag "#{name}", caption: l(:#{caption})#{order} %>) else "<th><%= l(:#{caption}) %></th>" end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
redmine-generators-0.0.1 | lib/redmine/generators/sortable_headers.rb |