table_sortable 1.0.0.pre.alpha.5 → 1.0.0.pre.alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c1587c4904a5f6af1eb564f4ed26244942f9beb3
4
- data.tar.gz: ed813f1b319d5cbee49580ff50cca6ceecf6a6a3
3
+ metadata.gz: 5055a180ef481b4c9dfa3e3949e19a1529ed7bb7
4
+ data.tar.gz: f020edd52fbe0654b5361f96ecfd68fa3d0e3a0f
5
5
  SHA512:
6
- metadata.gz: dfb1a882bc65296b760e88d55582c91f0b4fa0832cde0396731ebbe15436665f0777a03b21a2d937171388e4dd7d9d7651b79d5b77a60687c6b74f35e4b031fa
7
- data.tar.gz: 4ca4332bd6b432a4614f9b450bc2dc8b1b3b61d1061d3d34d0caef14a3123922dc54fe70d8631f017b5cd176410b26f25b7b843601ccea555cff37dc66e67ab7
6
+ metadata.gz: 0fa7c7f21d68a7101d4da194017398742e096e8a95796b2dbeeea494ca8b82f7844da48831f3d4b96b09186f6876100beaba70cc07f56d14a14b83dba72dbc89
7
+ data.tar.gz: cc3ea2fb9f7915d1cc2ab6dad4d31652290bdfd7989db3900cfe96793668af9a4cc55a5de745ac0a6d59c933e12e7359fbf13eb92ebe9607ca562c2a74caa1d4
data/.idea/.rakeTasks CHANGED
@@ -4,4 +4,4 @@ You are allowed to:
4
4
  1. Remove rake task
5
5
  2. Add existing rake tasks
6
6
  To add existing rake tasks automatically delete this file and reload the project.
7
- --><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Build table_sortable-0.2.0.gem into the pkg directory" fullCmd="build" taksId="build" /><RakeTask description="Remove any temporary products" fullCmd="clean" taksId="clean" /><RakeTask description="Remove any generated files" fullCmd="clobber" taksId="clobber" /><RakeTask description="Build and install table_sortable-0.2.0.gem into system gems" fullCmd="install" taksId="install" /><RakeGroup description="" fullCmd="" taksId="install"><RakeTask description="Build and install table_sortable-0.2.0.gem into system gems without network access" fullCmd="install:local" taksId="local" /></RakeGroup><RakeTask description="Create tag v0.2.0 and build and push table_sortable-0.2.0.gem to Rubygems" fullCmd="release[remote]" taksId="release[remote]" /><RakeTask description="Run tests" fullCmd="test" taksId="test" /><RakeTask description="" fullCmd="default" taksId="default" /><RakeTask description="" fullCmd="release" taksId="release" /><RakeGroup description="" fullCmd="" taksId="release"><RakeTask description="" fullCmd="release:guard_clean" taksId="guard_clean" /><RakeTask description="" fullCmd="release:rubygem_push" taksId="rubygem_push" /><RakeTask description="" fullCmd="release:source_control_push" taksId="source_control_push" /></RakeGroup></RakeGroup></Settings>
7
+ --><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Build table_sortable-1.0.0.pre.alpha.6.gem into the pkg directory" fullCmd="build" taksId="build" /><RakeTask description="Remove any temporary products" fullCmd="clean" taksId="clean" /><RakeTask description="Remove any generated files" fullCmd="clobber" taksId="clobber" /><RakeTask description="Build and install table_sortable-1.0.0.pre.alpha.6.gem into system gems" fullCmd="install" taksId="install" /><RakeGroup description="" fullCmd="" taksId="install"><RakeTask description="Build and install table_sortable-1.0.0.pre.alpha.6.gem into system gems without network access" fullCmd="install:local" taksId="local" /></RakeGroup><RakeTask description="Create tag v1.0.0.pre.alpha.6 and build and push table_sortable-1.0.0.pre.alpha.6.gem to Rubygems" fullCmd="release[remote]" taksId="release[remote]" /><RakeTask description="Run tests" fullCmd="test" taksId="test" /><RakeTask description="" fullCmd="default" taksId="default" /><RakeTask description="" fullCmd="release" taksId="release" /><RakeGroup description="" fullCmd="" taksId="release"><RakeTask description="" fullCmd="release:guard_clean" taksId="guard_clean" /><RakeTask description="" fullCmd="release:rubygem_push" taksId="rubygem_push" /><RakeTask description="" fullCmd="release:source_control_push" taksId="source_control_push" /></RakeGroup></RakeGroup></Settings>
@@ -1,7 +1,7 @@
1
1
  module TableSortable
2
2
  class Column
3
3
 
4
- attr_reader :name, :label, :filter, :sorter, :template, :placeholder, :content, :translation_key, :options, :template_path
4
+ attr_reader :name, :label, :filter, :sorter, :template, :placeholder, :content, :translation_key, :options, :template_path, :includes
5
5
 
6
6
  def initialize(col_name, *options)
7
7
 
@@ -14,6 +14,7 @@ module TableSortable
14
14
  placeholder = options[:placeholder] || (options[:placeholder] == false ? nil : label)
15
15
  template = options[:template] || col_name
16
16
  column_options = options[:options] || {}
17
+ includes = options[:includes] || []
17
18
 
18
19
  @name = col_name.to_sym
19
20
  @value = value.respond_to?(:call) ? value : -> (record) { record.send(value) }
@@ -23,6 +24,7 @@ module TableSortable
23
24
  @template = template
24
25
  @template_path = template_path
25
26
  @translation_key = translation_key
27
+ @includes = [includes].flatten.map{|as| as.is_a?(Hash) ? as : {as => []}}
26
28
 
27
29
  @options = column_options
28
30
  @filter = TableSortable::Column::Filter.new(options.merge(:column => self) )
@@ -1,3 +1,3 @@
1
1
  module TableSortable
2
- VERSION = "1.0.0.pre.alpha.5"
2
+ VERSION = "1.0.0.pre.alpha.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: table_sortable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.alpha.5
4
+ version: 1.0.0.pre.alpha.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oded Davidov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-13 00:00:00.000000000 Z
11
+ date: 2017-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler