katalyst-tables 3.3.3 → 3.3.4

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
  SHA256:
3
- metadata.gz: d65cbfb413fd7b0af947d48bad9dc622e1c83f7a659ba4cda14ed993c9aecb7d
4
- data.tar.gz: 280f74a21d9e14bc418b83274f338b5dc568117df255043336c18cfccea3e4d1
3
+ metadata.gz: 3d7d6dcd92a6643324d8dbc5cf4c94981dc44d4a1a9735cc9ea3fc3af7527ef3
4
+ data.tar.gz: 85a3f731c82146be98b237e3bfe79c8ee412629cf4115928b04ed8e701306be5
5
5
  SHA512:
6
- metadata.gz: 2c3500672cee22ac792eeb2f93eb3107fc94ce7f20320ced58f70a99de7f7e5a66543847615ac379a5004740ade01c553c60ef810ca8c7f854998beedb22219c
7
- data.tar.gz: f73225573194edcab9e26a2517d6752dfdb7852c0e3284a82cd2c6fd5f47f47aeb185bece9a5f46b3c1191a0b3dfd203165b3eb68a9738e506b836afb342d280
6
+ metadata.gz: 70b38e57a58ffb9d4bc1ba4d5044edd9624e90261e576b95a854aba4622fb9ed2e1b1b184643d244cfdb6647bb9509aa7e6402dd06a149bc32b6ad6ddc623883
7
+ data.tar.gz: c6d0d0810eaaf9b742789008375979f793953c979f0a8a1fbb436b84d06958cb0b24b9aecccb0070b5158f899858de252c63f5aeb72b97ffe038387cf04146af
@@ -30,9 +30,9 @@ module Katalyst
30
30
 
31
31
  def examples_for(key)
32
32
  key = key.to_s
33
- values_method = "#{key.parameterize.underscore}_values"
34
- if respond_to?(values_method)
35
- public_send(values_method)
33
+ examples_method = "#{key.parameterize.underscore}_examples"
34
+ if respond_to?(examples_method)
35
+ public_send(examples_method)
36
36
  elsif @attributes.key?(key)
37
37
  @attributes[key].type.examples_for(unscoped_items, @attributes[key])
38
38
  end
@@ -46,6 +46,8 @@ module Katalyst
46
46
 
47
47
  return unless model.attribute_types.has_key?(column)
48
48
 
49
+ column = model.arel_table[column]
50
+
49
51
  filter(scope, attribute)
50
52
  .group(column)
51
53
  .distinct
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: katalyst-tables
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.3
4
+ version: 3.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katalyst Interactive