Sha256: df38a375e29198acf210c3c66d8db6fbd2654332c23c8f0aa04c12c9b861304a

Contents?: true

Size: 537 Bytes

Versions: 9

Compression:

Stored size: 537 Bytes

Contents

module ActiveScaffoldSortable
  module ViewHelpers
    def sort_params(config = active_scaffold_config)
      options = {
        :tag => 'tr', 
        :format => '^[^_-](?:[A-Za-z0-9_-]*)-(.*)-row$',
        :column => config.sortable.column.name
      }
      options[:reorder_url] = url_for(params_for(:action => :reorder, :controller => controller_name)) if config == self.active_scaffold_config
      options.merge config.sortable.options
    end

    def active_scaffold_sortable_column(record, column)
      ''
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
active_scaffold_sortable-3.3.4 lib/active_scaffold_sortable/view_helpers.rb
active_scaffold_sortable-3.3.3 lib/active_scaffold_sortable/view_helpers.rb
active_scaffold_sortable-3.3.2 lib/active_scaffold_sortable/view_helpers.rb
active_scaffold_sortable-3.3.1 lib/active_scaffold_sortable/view_helpers.rb
active_scaffold_sortable-3.3.0 lib/active_scaffold_sortable/view_helpers.rb
active_scaffold_sortable-3.2.13 lib/active_scaffold_sortable/view_helpers.rb
active_scaffold_sortable-3.2.12 lib/active_scaffold_sortable/view_helpers.rb
active_scaffold_sortable-3.2.11 lib/active_scaffold_sortable/view_helpers.rb
active_scaffold_sortable-3.2.10 lib/active_scaffold_sortable/view_helpers.rb