tabulatr2 0.9.28 → 0.9.29

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: 75a9c5f408a4e735e95a2c85ceafdeb7a57d044d
4
- data.tar.gz: 121eb738bf373704c71984d85f49b6ff2919c473
3
+ metadata.gz: e5aec598ddedf0f1456066f02bcf64ed3957f5d6
4
+ data.tar.gz: bad8a12efe47459bd4f5e7739365ba4dd36fc380
5
5
  SHA512:
6
- metadata.gz: 7bec5aa103d9c50da0992b707e31bdc86c0cf9fe9ebc97d732e979287df0c512cf43aab62ae73e6f53aaaa73a33b97e261e5eb7786708d55cc969a5303f53aec
7
- data.tar.gz: 1726ea44a0115317d382bd08df1300b6de602c83d73f46ded450f6995467c68a919299f6f7bc9e545133e2b6305cfdc1ad2cac3d62e69bc12413b81b9f9f5084
6
+ metadata.gz: 92c342b899122045438c240753c535abd1589b10ecbcbeb77a6ce4fcc6786de4f4fbdb69ca42acf014e7578502f9a710f3a9ab2305838e7a794b45b48f6083ee
7
+ data.tar.gz: 95cad2508988b6cd350682306152878a40df059d0c78b5a60ee87a0a9c9fc0230c5ef007681d6b0f2534e54deed4b79f731ea01d881d18fbcf92237611bbd865
@@ -25,7 +25,8 @@ class Tabulatr::Data
25
25
 
26
26
  def initialize(relation)
27
27
  @relation = relation
28
- @base = relation.respond_to?(:klass) ? relation.klass : relation
28
+ @base = self.class.main_class rescue nil
29
+ @base ||= relation.respond_to?(:klass) ? relation.klass : relation
29
30
  @table_name = @base.table_name
30
31
  @search = self.class.instance_variable_get('@search') || HashWithIndifferentAccess.new
31
32
  @includes = Set.new()
@@ -22,5 +22,5 @@
22
22
  #++
23
23
 
24
24
  module Tabulatr
25
- VERSION = "0.9.28"
25
+ VERSION = "0.9.29"
26
26
  end
@@ -4,6 +4,7 @@ describe Tabulatr::Renderer do
4
4
 
5
5
  class FakeRendererSpecTabulatrData < Tabulatr::Data
6
6
  filter :simple_filter
7
+ target_class Product
7
8
  end
8
9
 
9
10
  def double_view
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tabulatr2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.28
4
+ version: 0.9.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Horn
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-02-27 00:00:00.000000000 Z
13
+ date: 2016-04-15 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -281,7 +281,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
281
281
  version: '0'
282
282
  requirements: []
283
283
  rubyforge_project:
284
- rubygems_version: 2.4.8
284
+ rubygems_version: 2.5.1
285
285
  signing_key:
286
286
  specification_version: 4
287
287
  summary: A tight DSL to build tables of ActiveRecord models with sorting, pagination,