rls_multi_tenant 0.2.4 → 0.2.5
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: 7a8043bdc925d9f0e5e05d743f457e9baad7d861ccfa0f649bbc2b07f48c8958
         | 
| 4 | 
            +
              data.tar.gz: 2476c3fbd98f58f8eb50be5cfbaeb95c6219a0aba2b77b250617a8d83970e16d
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 2679ab3b6517e126ac6ba342ed6c1144af54e52bde076385ac73e5fa0d56db98dee75c4a71ad81136c0f11faf3bd1532bd5e9545c741badc34016fc0fb360244
         | 
| 7 | 
            +
              data.tar.gz: ce18b2512ba1bbd63fd78388fbf752f66ea9eb4aa44aef8f16ec5ec2982c2f4996a24511f4e613a0b41916219ab557a4b0eb3a4ca70afa7b6e1cef07b6d8f2bf
         | 
| @@ -27,22 +27,6 @@ module RlsMultiTenant | |
| 27 27 | 
             
                      end
         | 
| 28 28 | 
             
                    end
         | 
| 29 29 | 
             
                  end
         | 
| 30 | 
            -
             | 
| 31 | 
            -
                  class_methods do
         | 
| 32 | 
            -
                    private
         | 
| 33 | 
            -
             | 
| 34 | 
            -
                    def extract_tenant_id(tenant_or_id)
         | 
| 35 | 
            -
                      case tenant_or_id
         | 
| 36 | 
            -
                      when RlsMultiTenant.tenant_class
         | 
| 37 | 
            -
                        tenant_or_id.id
         | 
| 38 | 
            -
                      when String, Integer
         | 
| 39 | 
            -
                        tenant_or_id
         | 
| 40 | 
            -
                      else
         | 
| 41 | 
            -
                        raise ArgumentError,
         | 
| 42 | 
            -
                              "Expected #{RlsMultiTenant.tenant_class_name} object or tenant_id, got #{tenant_or_id.class}"
         | 
| 43 | 
            -
                      end
         | 
| 44 | 
            -
                    end
         | 
| 45 | 
            -
                  end
         | 
| 46 30 | 
             
                end
         | 
| 47 31 | 
             
              end
         | 
| 48 32 | 
             
            end
         |