effective_datatables 4.33.1 → 4.34.0
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
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 26894b39aa930851150fb6139d8207d61dd054910d78b78a88cb8d961291b10e
         | 
| 4 | 
            +
              data.tar.gz: d1c9d28d703e5db73743f23ca73c147e334d81b930219f8e756f72189ba03c1c
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 2bfb288465fbb24ae508957762bc62f2f9b16628460304ff0d94337726b92535ecd82115d9fe518ddda0a9569a507e6a6d91e8a19a192ec56904ae5ee39558b6
         | 
| 7 | 
            +
              data.tar.gz: fb1a9edee1c2d47158ac6cf352926ef05566d36bf88a54f0ad6dca288f2b89c44a73f2733576e57b76b1e8316edf72119e535abfb4ae591545f1867ab7ada703
         | 
| @@ -117,7 +117,9 @@ module Effective | |
| 117 117 | 
             
                    when :actions
         | 
| 118 118 | 
             
                      raise("please use actions_col instead of col(#{name}, as: :actions)")
         | 
| 119 119 | 
             
                    when :boolean
         | 
| 120 | 
            -
                      view.t("effective_datatables.boolean_#{value}")
         | 
| 120 | 
            +
                      label = view.t("effective_datatables.boolean_#{value}")
         | 
| 121 | 
            +
                      color = value ? EffectiveDatatables.format_true : EffectiveDatatables.format_false
         | 
| 122 | 
            +
                      color.present? ? view.badge(label, color) : label
         | 
| 121 123 | 
             
                    when :currency
         | 
| 122 124 | 
             
                      view.number_to_currency(value)
         | 
| 123 125 | 
             
                    when :date
         | 
| @@ -46,6 +46,10 @@ EffectiveDatatables.setup do |config| | |
| 46 46 | 
             
              config.format_date = '%F'
         | 
| 47 47 | 
             
              config.format_time = '%H:%M'
         | 
| 48 48 |  | 
| 49 | 
            +
              # Boolean formatting. When present will render booleans as badges with this bootstrap color
         | 
| 50 | 
            +
              config.format_true = 'success'
         | 
| 51 | 
            +
              config.format_false = 'danger'
         | 
| 52 | 
            +
             | 
| 49 53 | 
             
              # Enable the Download button which serves a CSV of your collection
         | 
| 50 54 | 
             
              config.download = false
         | 
| 51 55 |  | 
    
        data/lib/effective_datatables.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: effective_datatables
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 4. | 
| 4 | 
            +
              version: 4.34.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Code and Effect
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2025-04- | 
| 11 | 
            +
            date: 2025-04-29 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rails
         |