Module: SortableColumns

Defined in:
lib/sortable_columns.rb,
lib/sortable_columns/config.rb,
lib/sortable_columns/version.rb,
lib/sortable_columns/column_sorter.rb,
lib/sortable_columns/action_view_extensions/sort_helper.rb

Defined Under Namespace

Modules: ActionViewExtensions Classes: ColumnSorter, Configuration

Constant Summary collapse

VERSION =
"0.0.0.3"

Class Method Summary collapse

Class Method Details

.configObject

Global settings for SortableColumns



13
14
15
# File 'lib/sortable_columns/config.rb', line 13

def self.config
  @config
end

.configure {|@config ||= SortableColumns::Configuration.new| ... } ⇒ Object

Configures global settings for SortableColumns

SortableColumns.configure do |config|
  config.default_sort_column = 'created_at'
end


8
9
10
# File 'lib/sortable_columns/config.rb', line 8

def self.configure(&block)
  yield @config ||= SortableColumns::Configuration.new
end