table_sortable 1.0.0.pre.alpha.5 → 1.0.0.pre.alpha.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.idea/.rakeTasks +1 -1
- data/lib/table_sortable/column.rb +3 -1
- data/lib/table_sortable/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5055a180ef481b4c9dfa3e3949e19a1529ed7bb7
|
4
|
+
data.tar.gz: f020edd52fbe0654b5361f96ecfd68fa3d0e3a0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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) )
|
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.
|
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-
|
11
|
+
date: 2017-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|