table_sortable 1.0.0.pre.alpha.15 → 1.0.0.pre.alpha.16
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 +4 -4
 - data/lib/table_sortable/column/filter.rb +2 -1
 - data/lib/table_sortable/version.rb +1 -1
 - data/lib/table_sortable/view_helpers.rb +1 -0
 - 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: 3c10bbda06c238127a586fe59164e874fcb80f4e
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 3a491e702e6db80960f3c2b26c025f3c6e31d55b
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 386ec7cb208506547794bcfcbcb8c5da468869bd9c8a192d091f4ab63e45960b2ffb4dd0a3eee0f5afa670dc154881760a1fa8ed94b591c7fcc9d5a625d7cc80
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: d76dfff3a5fcd2c9b92e70cdcdb1f26a9d1d5033950fe866278a77c0e8a6079d82dbfa1540871311048b2fee41afa2dde3959d91d9ffadd3d583f8bcce2c1b43
         
     | 
| 
         @@ -3,12 +3,13 @@ module TableSortable 
     | 
|
| 
       3 
3 
     | 
    
         
             
                class Filter
         
     | 
| 
       4 
4 
     | 
    
         
             
                  include TableSortable::Concerns::Proc
         
     | 
| 
       5 
5 
     | 
    
         | 
| 
       6 
     | 
    
         
            -
                  attr_accessor :query, :default_value, :collection
         
     | 
| 
      
 6 
     | 
    
         
            +
                  attr_accessor :query, :default_value, :collection, :sort_collection
         
     | 
| 
       7 
7 
     | 
    
         | 
| 
       8 
8 
     | 
    
         
             
                  def initialize(*args)
         
     | 
| 
       9 
9 
     | 
    
         
             
                    options = args.extract_options!
         
     | 
| 
       10 
10 
     | 
    
         
             
                    @default_value = options[:filter_initial_value]
         
     | 
| 
       11 
11 
     | 
    
         
             
                    @collection = options[:filter_collection]
         
     | 
| 
      
 12 
     | 
    
         
            +
                    @sort_collection = options[:filter_sort_collection] || false
         
     | 
| 
       12 
13 
     | 
    
         
             
                    super :filter, options
         
     | 
| 
       13 
14 
     | 
    
         
             
                  end
         
     | 
| 
       14 
15 
     | 
    
         | 
| 
         @@ -31,6 +31,7 @@ module TableSortable 
     | 
|
| 
       31 
31 
     | 
    
         
             
                    th_options['data-sorter'] = 'false' if col.sorter.disabled?
         
     | 
| 
       32 
32 
     | 
    
         
             
                    unless col.filter.collection.blank?
         
     | 
| 
       33 
33 
     | 
    
         
             
                      th_options['data-filter-options'] = col.filter.collection.to_json
         
     | 
| 
      
 34 
     | 
    
         
            +
                      th_options['class'] = 'filter-select-nosort' unless col.filter.sort_collection
         
     | 
| 
       34 
35 
     | 
    
         
             
                    end
         
     | 
| 
       35 
36 
     | 
    
         
             
                    th_options['data-value'] = col.filter.default_value if col.filter.default_value
         
     | 
| 
       36 
37 
     | 
    
         
             
                    th_options.merge!(html_options)
         
     | 
    
        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.16
         
     | 
| 
       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-10- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2017-10-21 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: bundler
         
     |