collate 0.1.13 → 0.1.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1a1043e6239f5d01789d428b7e2a99981a50bfae
4
- data.tar.gz: 7a9a5f62c31e15bf169f4603b2b918ddac18eaa2
3
+ metadata.gz: 94cfb77ae2c2ee79dd927782c5450491c658fe02
4
+ data.tar.gz: 58c968df9aad21f0e194e6f5b3108bd2ecbea4ab
5
5
  SHA512:
6
- metadata.gz: 57a6403641748cfda153ff5beb882c3771be33ef065683acf8a1683a719c9b7d97fb026d57574168dd8ff35bd2a2d590b937745f72d0f3ad9250caddc700fcc1
7
- data.tar.gz: 92138097b710896538f29c0b17a0c7255e7b1cc2ee12cf2ac21821dbc1c793f6117c54036f61bce8de5ad70b097c9d0b978b6a898c90742ac7ad18e5c12a7c6d
6
+ metadata.gz: d0e101db11da883bfdb65d40ad3db4c8459bf4481e602a064d7f585eb85eed0653aa22a8913adde699db8862d8e480afb055a34b39acfbc8051f61e97376b565
7
+ data.tar.gz: 7e5df6f52f0629bde97dbc90457bd36f7e42f42f77ce0229c57c24da8a67beb6c1468449cf81e79c70ca11b92eed6eb0eb39df2395c1b0b90c797942cee4e692
@@ -195,7 +195,7 @@ module Collate
195
195
  if filter.component[:load_records]
196
196
  results = filter.component[:load_record_model].constantize.where("#{filter.component[:load_record_field]} IN (?)", filter_value)
197
197
 
198
- filter.component[:values] = results.map{ |r| {id: r.id, text: r.name} }
198
+ filter.component[:values] = results.map{ |r| {id: r.id, text: r.public_send(filter.component[:load_record_text_method])} }
199
199
  end
200
200
 
201
201
  if filter.component[:tags]
@@ -58,6 +58,7 @@ module Collate
58
58
  self.component[:load_record_model] ||= model_name.titleize
59
59
  self.component[:load_record_field] ||= "id"
60
60
  self.component[:load_record_route] ||= "/#{model_name.pluralize}.json"
61
+ self.component[:load_record_text_method] ||= "name"
61
62
  end
62
63
 
63
64
  self.joins ||= if table_name != base_model_table_name
@@ -1,3 +1,3 @@
1
1
  module Collate
2
- VERSION = "0.1.13"
2
+ VERSION = "0.1.14"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: collate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.13
4
+ version: 0.1.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicholas Page
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2017-04-05 00:00:00.000000000 Z
12
+ date: 2017-04-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler