effective_resources 2.2.3 → 2.2.4
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/app/models/effective/resources/relation.rb +2 -2
 - data/lib/effective_resources/version.rb +1 -1
 - metadata +1 -1
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: af933d56ed2a8a49c9b05dfee64b5a8e7a13d84358c54966208507f1703090ec
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: dd28e88602d3c2d9f4b908d79260b2849d34cbdd3c8b6c204a18c96c2ad2d217
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: a46d1580c41d7597766cea58782d0e7c4092aca90210049b5155d9b0330c3b5ed01cb8f24d8ab299bc12fcdec13a3b9f79fb8e4959e4cb3b38af1a1d407164a2
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: a422ebe046792b4f000918c86a0df61e9884f276dbb5d580cce8ac02fb090186552cc25ae3da26682775460ef84a9da7a7296e2260e9e02c1a5ccec7d5960e0f
         
     | 
| 
         @@ -284,7 +284,7 @@ module Effective 
     | 
|
| 
       284 
284 
     | 
    
         
             
                    term = Attribute.new(as).parse(value, name: name) || value
         
     | 
| 
       285 
285 
     | 
    
         | 
| 
       286 
286 
     | 
    
         
             
                    # If using the joined syntax from datatables
         
     | 
| 
       287 
     | 
    
         
            -
                    joined = sql_column.to_s. 
     | 
| 
      
 287 
     | 
    
         
            +
                    joined = (sql_column.to_s.split('.').first.to_s.include?(relation.arel_table.name) == false)
         
     | 
| 
       288 
288 
     | 
    
         | 
| 
       289 
289 
     | 
    
         
             
                    searched = case as
         
     | 
| 
       290 
290 
     | 
    
         
             
                      when :active_storage
         
     | 
| 
         @@ -338,7 +338,7 @@ module Effective 
     | 
|
| 
       338 
338 
     | 
    
         
             
                      when :eq then
         
     | 
| 
       339 
339 
     | 
    
         
             
                        joined ? relation.where("#{sql_column} = ?", term) : relation.where(attribute.eq(term))
         
     | 
| 
       340 
340 
     | 
    
         
             
                      when :matches then
         
     | 
| 
       341 
     | 
    
         
            -
                        joined ? relation.where("#{sql_column} #{ilike} ?", "%#{term}%") : relation.where(attribute. 
     | 
| 
      
 341 
     | 
    
         
            +
                        joined ? relation.where("#{sql_column} #{ilike} ?", "%#{term}%") : relation.where(attribute.matches("%#{term}%"))
         
     | 
| 
       342 
342 
     | 
    
         
             
                      when :not_eq then relation.where(attribute.not_eq(term))
         
     | 
| 
       343 
343 
     | 
    
         
             
                      when :does_not_match then relation.where(attribute.does_not_match("%#{term}%"))
         
     | 
| 
       344 
344 
     | 
    
         
             
                      when :starts_with then relation.where(attribute.matches("#{term}%"))
         
     |